]> git.eshelyaron.com Git - emacs.git/commitdiff
(pure_alloc): After overflow, allocate just a small block.
authorRichard M. Stallman <rms@gnu.org>
Sun, 16 Dec 2001 21:52:36 +0000 (21:52 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 16 Dec 2001 21:52:36 +0000 (21:52 +0000)
src/alloc.c

index 731391a779bf0aa5cbd4bf310b2be707fff05ca7..52cada7aba5bfd828bacac4abee8c3b56d837f10 100644 (file)
@@ -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;
     }