aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorRichard M. Stallman2001-12-16 21:52:36 +0000
committerRichard M. Stallman2001-12-16 21:52:36 +0000
commit8322ce0491fe3d3cd96417e870df75fe8b4a18ac (patch)
treee2e615936ad64b5ed226777f5a2f84a0822a841e /src/alloc.c
parentd75bec6aebe749bc66a5a7ffabe34d3bebb8e769 (diff)
downloademacs-8322ce0491fe3d3cd96417e870df75fe8b4a18ac.tar.gz
emacs-8322ce0491fe3d3cd96417e870df75fe8b4a18ac.zip
(pure_alloc): After overflow, allocate just a small block.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c7
1 files changed, 5 insertions, 2 deletions
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)
3816 3816
3817 if (pure_bytes_used + nbytes > pure_size) 3817 if (pure_bytes_used + nbytes > pure_size)
3818 { 3818 {
3819 beg = purebeg = (char *) xmalloc (PURESIZE); 3819 /* Don't allocate a large amount here,
3820 pure_size = PURESIZE; 3820 because it might get mmap'd and then its address
3821 might not be usable. */
3822 beg = purebeg = (char *) xmalloc (10000);
3823 pure_size = 10000;
3821 pure_bytes_used_before_overflow += pure_bytes_used; 3824 pure_bytes_used_before_overflow += pure_bytes_used;
3822 pure_bytes_used = 0; 3825 pure_bytes_used = 0;
3823 } 3826 }