summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2005-10-04 20:26:13 +0000
committerRichard M. Stallman <rms@gnu.org>2005-10-04 20:26:13 +0000
commitd90283f2e08625a585f44b72a5c213986609309f (patch)
tree99ae5e9f93c3e7e57bd2be0113c5bfcdea478cbd /src/alloc.c
parenta6f19fbc2a8c5114ad39a1341b4b6b70042c79dc (diff)
downloademacs-d90283f2e08625a585f44b72a5c213986609309f.tar.gz
(refill_memory_reserve): Conditionalize the body, not the function's existence.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/alloc.c b/src/alloc.c
index ccf4afff9f8..54533ff351a 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -547,6 +547,21 @@ DEFUN ("memory-full-p", Fmemory_full_p, Smemory_full_p, 0, 0, 0,
return (spare_memory ? Qnil : Qt);
}
+/* If we released our reserve (due to running out of memory),
+ and we have a fair amount free once again,
+ try to set aside another reserve in case we run out once more.
+
+ This is called when a relocatable block is freed in ralloc.c. */
+
+void
+refill_memory_reserve ()
+{
+#ifndef SYSTEM_MALLOC
+ if (spare_memory == 0)
+ spare_memory = (char *) malloc ((size_t) SPARE_MEMORY);
+#endif
+}
+
/* Called if we can't allocate relocatable space for a buffer. */
void
@@ -1134,20 +1149,6 @@ allocate_buffer ()
#ifndef SYSTEM_MALLOC
-/* If we released our reserve (due to running out of memory),
- and we have a fair amount free once again,
- try to set aside another reserve in case we run out once more.
-
- This is called when a relocatable block is freed in ralloc.c. */
-
-void
-refill_memory_reserve ()
-{
- if (spare_memory == 0)
- spare_memory = (char *) malloc ((size_t) SPARE_MEMORY);
-}
-
-
/* Arranging to disable input signals while we're in malloc.
This only works with GNU malloc. To help out systems which can't