From 8322ce0491fe3d3cd96417e870df75fe8b4a18ac Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 16 Dec 2001 21:52:36 +0000 Subject: [PATCH] (pure_alloc): After overflow, allocate just a small block. --- src/alloc.c | 7 +++++-- 1 file 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) 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; } -- 2.39.2