]> git.eshelyaron.com Git - emacs.git/commitdiff
(spare_memory): No longer static.
authorRichard M. Stallman <rms@gnu.org>
Fri, 28 Oct 2005 16:25:37 +0000 (16:25 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 28 Oct 2005 16:25:37 +0000 (16:25 +0000)
(xfree) [!SYSTEM_MALLOC]: Call refill_memory_reserve.

src/alloc.c

index 54533ff351a42e27ec3c2918fb60c90411a1dd58..b8744b3f09a895df90f0c1bd7e784e3adde0b540 100644 (file)
@@ -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
 }