From 70c8ed55fdda7631e5e930bba81395ba9d8d1751 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 29 Nov 2020 11:05:10 +0100 Subject: [PATCH] garbage-collect doc string clarification * src/alloc.c (Fgarbage_collect): Mention that calling this function is not guaranteed to collect all the garbage (bug#34404). --- src/alloc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/alloc.c b/src/alloc.c index 504ef179ecc..34f822e589e 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -6154,10 +6154,17 @@ where each entry has the form (NAME SIZE USED FREE), where: - FREE is the number of those objects that are not live but that Emacs keeps around for future allocations (maybe because it does not know how to return them to the OS). + However, if there was overflow in pure space, and Emacs was dumped using the 'unexec' method, `garbage-collect' returns nil, because real GC can't be done. -See Info node `(elisp)Garbage Collection'. */) + +Note that calling this function does not guarantee that absolutely all +unreachable objects will be garbage-collected. Emacs uses a +mark-and-sweep garbage collector, but is conservative when it comes to +collecting objects in some circumstances. + +For further details, see Info node `(elisp)Garbage Collection'. */) (void) { if (garbage_collection_inhibited) -- 2.39.5