Mercurial > emacs
diff src/alloc.c @ 65832:5159ee08b219
(refill_memory_reserve): Conditionalize the body, not the function's existence.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Tue, 04 Oct 2005 20:26:13 +0000 |
| parents | 375ab086d366 |
| children | 0e243de6311b 2a679c81f552 aa89c814f853 |
line wrap: on
line diff
--- a/src/alloc.c Tue Oct 04 18:29:01 2005 +0000 +++ b/src/alloc.c Tue Oct 04 20:26:13 2005 +0000 @@ -547,6 +547,21 @@ 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 @@ #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
