Mercurial > emacs
comparison src/alloc.c @ 66499:0e243de6311b
(spare_memory): No longer static.
(xfree) [!SYSTEM_MALLOC]: Call refill_memory_reserve.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Fri, 28 Oct 2005 16:25:37 +0000 |
| parents | 5159ee08b219 |
| children | 88aab29bf2b2 |
comparison
equal
deleted
inserted
replaced
| 66498:44a0b7df81e4 | 66499:0e243de6311b |
|---|---|
| 213 static int total_free_floats, total_floats; | 213 static int total_free_floats, total_floats; |
| 214 | 214 |
| 215 /* Points to memory space allocated as "spare", to be freed if we run | 215 /* Points to memory space allocated as "spare", to be freed if we run |
| 216 out of memory. */ | 216 out of memory. */ |
| 217 | 217 |
| 218 static char *spare_memory; | 218 char *spare_memory; |
| 219 | 219 |
| 220 /* Amount of spare memory to keep in reserve. */ | 220 /* Amount of spare memory to keep in reserve. */ |
| 221 | 221 |
| 222 #define SPARE_MEMORY (1 << 14) | 222 #define SPARE_MEMORY (1 << 14) |
| 223 | 223 |
| 803 POINTER_TYPE *block; | 803 POINTER_TYPE *block; |
| 804 { | 804 { |
| 805 BLOCK_INPUT; | 805 BLOCK_INPUT; |
| 806 free (block); | 806 free (block); |
| 807 UNBLOCK_INPUT; | 807 UNBLOCK_INPUT; |
| 808 | |
| 809 #ifndef SYSTEM_MALLOC | |
| 810 /* Refill the spare memory if we can. */ | |
| 811 if (spare_memory == 0) | |
| 812 refill_memory_reserve (); | |
| 813 #endif | |
| 808 } | 814 } |
| 809 | 815 |
| 810 | 816 |
| 811 /* Like strdup, but uses xmalloc. */ | 817 /* Like strdup, but uses xmalloc. */ |
| 812 | 818 |
