From: Lars Ingebrigtsen Date: Sun, 29 Nov 2020 10:05:10 +0000 (+0100) Subject: garbage-collect doc string clarification X-Git-Tag: emacs-28.0.90~4998 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=70c8ed55fdda7631e5e930bba81395ba9d8d1751;p=emacs.git 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). --- 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)