From 745575ff149a7ceab51241854d8e0014f2c1dbdb Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 28 Oct 2005 16:25:37 +0000 Subject: [PATCH] (spare_memory): No longer static. (xfree) [!SYSTEM_MALLOC]: Call refill_memory_reserve. --- src/alloc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/alloc.c b/src/alloc.c index 54533ff351a..b8744b3f09a 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -215,7 +215,7 @@ static int total_free_floats, total_floats; /* Points to memory space allocated as "spare", to be freed if we run out of memory. */ -static char *spare_memory; +char *spare_memory; /* Amount of spare memory to keep in reserve. */ @@ -805,6 +805,12 @@ xfree (block) BLOCK_INPUT; free (block); UNBLOCK_INPUT; + +#ifndef SYSTEM_MALLOC + /* Refill the spare memory if we can. */ + if (spare_memory == 0) + refill_memory_reserve (); +#endif } -- 2.39.5