diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/alloc.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/alloc.c b/src/alloc.c index 8ceacfe8ead..03dacc77c6e 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -5525,9 +5525,16 @@ garbage_collect_1 (void *end) | |||
| 5525 | don't let that cause a recursive GC. */ | 5525 | don't let that cause a recursive GC. */ |
| 5526 | consing_since_gc = 0; | 5526 | consing_since_gc = 0; |
| 5527 | 5527 | ||
| 5528 | /* Save what's currently displayed in the echo area. */ | 5528 | /* Save what's currently displayed in the echo area. Don't do that |
| 5529 | message_p = push_message (); | 5529 | if we are GC'ing because we've run out of memory, since |
| 5530 | record_unwind_protect_void (pop_message_unwind); | 5530 | push_message will cons, and we might have no memory for that. */ |
| 5531 | if (NILP (Vmemory_full)) | ||
| 5532 | { | ||
| 5533 | message_p = push_message (); | ||
| 5534 | record_unwind_protect_void (pop_message_unwind); | ||
| 5535 | } | ||
| 5536 | else | ||
| 5537 | message_p = false; | ||
| 5531 | 5538 | ||
| 5532 | /* Save a copy of the contents of the stack, for debugging. */ | 5539 | /* Save a copy of the contents of the stack, for debugging. */ |
| 5533 | #if MAX_SAVE_STACK > 0 | 5540 | #if MAX_SAVE_STACK > 0 |
| @@ -5658,7 +5665,7 @@ garbage_collect_1 (void *end) | |||
| 5658 | } | 5665 | } |
| 5659 | } | 5666 | } |
| 5660 | 5667 | ||
| 5661 | if (garbage_collection_messages) | 5668 | if (garbage_collection_messages && NILP (Vmemory_full)) |
| 5662 | { | 5669 | { |
| 5663 | if (message_p || minibuf_level > 0) | 5670 | if (message_p || minibuf_level > 0) |
| 5664 | restore_message (); | 5671 | restore_message (); |