From: Richard M. Stallman Date: Sun, 16 Dec 2001 21:52:36 +0000 (+0000) Subject: (pure_alloc): After overflow, allocate just a small block. X-Git-Tag: ttn-vms-21-2-B4~17671 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8322ce0491fe3d3cd96417e870df75fe8b4a18ac;p=emacs.git (pure_alloc): After overflow, allocate just a small block. --- diff --git a/src/alloc.c b/src/alloc.c index 731391a779b..52cada7aba5 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -3816,8 +3816,11 @@ pure_alloc (size, type) if (pure_bytes_used + nbytes > pure_size) { - beg = purebeg = (char *) xmalloc (PURESIZE); - pure_size = PURESIZE; + /* Don't allocate a large amount here, + because it might get mmap'd and then its address + might not be usable. */ + beg = purebeg = (char *) xmalloc (10000); + pure_size = 10000; pure_bytes_used_before_overflow += pure_bytes_used; pure_bytes_used = 0; }