diff options
| author | Richard M. Stallman | 1996-04-08 14:05:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-04-08 14:05:57 +0000 |
| commit | 299585eeb6412fcaac700cbfd40dbbb2f62ca92a (patch) | |
| tree | 9f1c6dd81afed3ab1733e9d4d6c59432c7b62c1e /src/alloc.c | |
| parent | be1d1a1ae5fa1641fc5eccd6ebe049c6a3cab124 (diff) | |
| download | emacs-299585eeb6412fcaac700cbfd40dbbb2f62ca92a.tar.gz emacs-299585eeb6412fcaac700cbfd40dbbb2f62ca92a.zip | |
(garbage_collection_messages): New variable.
(syms_of_alloc): Set up Lisp variable.
(Fgarbage_collect): Variable controls whether to display messages.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/alloc.c b/src/alloc.c index c667acecdfc..bb27a5df109 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -88,6 +88,9 @@ int gc_cons_threshold; | |||
| 88 | /* Nonzero during gc */ | 88 | /* Nonzero during gc */ |
| 89 | int gc_in_progress; | 89 | int gc_in_progress; |
| 90 | 90 | ||
| 91 | /* Nonzero means display messages at beginning and end of GC. */ | ||
| 92 | int garbage_collection_messages; | ||
| 93 | |||
| 91 | #ifndef VIRT_ADDR_VARIES | 94 | #ifndef VIRT_ADDR_VARIES |
| 92 | extern | 95 | extern |
| 93 | #endif /* VIRT_ADDR_VARIES */ | 96 | #endif /* VIRT_ADDR_VARIES */ |
| @@ -1490,7 +1493,7 @@ Garbage collection happens automatically if you cons more than\n\ | |||
| 1490 | } | 1493 | } |
| 1491 | #endif /* MAX_SAVE_STACK > 0 */ | 1494 | #endif /* MAX_SAVE_STACK > 0 */ |
| 1492 | 1495 | ||
| 1493 | if (!noninteractive) | 1496 | if (garbage_collection_messages) |
| 1494 | message1_nolog ("Garbage collecting..."); | 1497 | message1_nolog ("Garbage collecting..."); |
| 1495 | 1498 | ||
| 1496 | /* Don't keep command history around forever */ | 1499 | /* Don't keep command history around forever */ |
| @@ -1606,10 +1609,13 @@ Garbage collection happens automatically if you cons more than\n\ | |||
| 1606 | if (gc_cons_threshold < 10000) | 1609 | if (gc_cons_threshold < 10000) |
| 1607 | gc_cons_threshold = 10000; | 1610 | gc_cons_threshold = 10000; |
| 1608 | 1611 | ||
| 1609 | if (omessage || minibuf_level > 0) | 1612 | if (garbage_collection_messages) |
| 1610 | message2_nolog (omessage, omessage_length); | 1613 | { |
| 1611 | else if (!noninteractive) | 1614 | if (omessage || minibuf_level > 0) |
| 1612 | message1_nolog ("Garbage collecting...done"); | 1615 | message2_nolog (omessage, omessage_length); |
| 1616 | else | ||
| 1617 | message1_nolog ("Garbage collecting...done"); | ||
| 1618 | } | ||
| 1613 | 1619 | ||
| 1614 | return Fcons (Fcons (make_number (total_conses), | 1620 | return Fcons (Fcons (make_number (total_conses), |
| 1615 | make_number (total_free_conses)), | 1621 | make_number (total_free_conses)), |
| @@ -2611,6 +2617,10 @@ The size is counted as the number of bytes occupied,\n\ | |||
| 2611 | which includes both saved text and other data."); | 2617 | which includes both saved text and other data."); |
| 2612 | undo_strong_limit = 30000; | 2618 | undo_strong_limit = 30000; |
| 2613 | 2619 | ||
| 2620 | DEFVAR_BOOL ("garbage-collection-messages", &garbage_collection_messages, | ||
| 2621 | "Non-nil means display messages at start and end of garbage collection."); | ||
| 2622 | garbage_collection_messages = 0; | ||
| 2623 | |||
| 2614 | /* We build this in advance because if we wait until we need it, we might | 2624 | /* We build this in advance because if we wait until we need it, we might |
| 2615 | not be able to allocate the memory to hold it. */ | 2625 | not be able to allocate the memory to hold it. */ |
| 2616 | memory_signal_data | 2626 | memory_signal_data |