diff options
| author | Paul Eggert | 2011-06-06 10:58:07 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-06 10:58:07 -0700 |
| commit | 77984278b977d1ad4d8af78d79adb1563e0b4aa6 (patch) | |
| tree | f9c6300fbd5137050d787d3e1cd71a303ebd50c2 /src/alloc.c | |
| parent | be44ca6cd47bff4cb0dfcfd71aa14f10fdab5434 (diff) | |
| parent | d6d100dd7c48e124ca9ce4bbb761f24b8e052493 (diff) | |
| download | emacs-77984278b977d1ad4d8af78d79adb1563e0b4aa6.tar.gz emacs-77984278b977d1ad4d8af78d79adb1563e0b4aa6.zip | |
Merge from trunk.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/alloc.c b/src/alloc.c index d9e00c3aeb4..cfbb79b2e61 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -190,17 +190,10 @@ static int total_free_floats, total_floats; | |||
| 190 | 190 | ||
| 191 | static char *spare_memory[7]; | 191 | static char *spare_memory[7]; |
| 192 | 192 | ||
| 193 | #ifndef SYSTEM_MALLOC | 193 | /* Amount of spare memory to keep in large reserve block, or to see |
| 194 | /* Amount of spare memory to keep in large reserve block. */ | 194 | whether this much is available when malloc fails on a larger request. */ |
| 195 | 195 | ||
| 196 | #define SPARE_MEMORY (1 << 14) | 196 | #define SPARE_MEMORY (1 << 14) |
| 197 | #endif | ||
| 198 | |||
| 199 | #ifdef SYSTEM_MALLOC | ||
| 200 | # define LARGE_REQUEST (1 << 14) | ||
| 201 | #else | ||
| 202 | # define LARGE_REQUEST SPARE_MEMORY | ||
| 203 | #endif | ||
| 204 | 197 | ||
| 205 | /* Number of extra blocks malloc should get when it needs more core. */ | 198 | /* Number of extra blocks malloc should get when it needs more core. */ |
| 206 | 199 | ||
| @@ -3289,9 +3282,9 @@ memory_full (size_t nbytes) | |||
| 3289 | { | 3282 | { |
| 3290 | /* Do not go into hysterics merely because a large request failed. */ | 3283 | /* Do not go into hysterics merely because a large request failed. */ |
| 3291 | int enough_free_memory = 0; | 3284 | int enough_free_memory = 0; |
| 3292 | if (LARGE_REQUEST < nbytes) | 3285 | if (SPARE_MEMORY < nbytes) |
| 3293 | { | 3286 | { |
| 3294 | void *p = malloc (LARGE_REQUEST); | 3287 | void *p = malloc (SPARE_MEMORY); |
| 3295 | if (p) | 3288 | if (p) |
| 3296 | { | 3289 | { |
| 3297 | free (p); | 3290 | free (p); |