aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2019-12-14 20:02:11 +0200
committerEli Zaretskii2019-12-14 20:02:11 +0200
commita01a7222829682962a229e26688a4d44829b6d5f (patch)
treedc44351e8647a67cb7b4876968804c2cbd791de2
parent0eff1a0191fc489debfcce1b695937112608718a (diff)
downloademacs-a01a7222829682962a229e26688a4d44829b6d5f.tar.gz
emacs-a01a7222829682962a229e26688a4d44829b6d5f.zip
Update documentation of pure-space overflow
* doc/lispref/internals.texi (Garbage Collection) (Pure Storage): * src/alloc.c (Fgarbage_collect): Update the documentation of pure-space overflow for when pdumper is used. (Bug#38492)
-rw-r--r--doc/lispref/internals.texi25
-rw-r--r--src/alloc.c5
2 files changed, 19 insertions, 11 deletions
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi
index eed9cb0a109..8c55f4ea373 100644
--- a/doc/lispref/internals.texi
+++ b/doc/lispref/internals.texi
@@ -261,12 +261,17 @@ the memory space can be shared by all the Emacs jobs running on the
261machine at once. Pure storage is not expandable; a fixed amount is 261machine at once. Pure storage is not expandable; a fixed amount is
262allocated when Emacs is compiled, and if that is not sufficient for 262allocated when Emacs is compiled, and if that is not sufficient for
263the preloaded libraries, @file{temacs} allocates dynamic memory for 263the preloaded libraries, @file{temacs} allocates dynamic memory for
264the part that didn't fit. The resulting image will work, but garbage 264the part that didn't fit. If Emacs will be dumped using the
265collection (@pxref{Garbage Collection}) is disabled in this situation, 265@code{pdump} method (@pxref{Building Emacs}), the pure-space overflow
266causing a memory leak. Such an overflow normally won't happen unless 266is of no special importance (it just means some of the preloaded stuff
267you try to preload additional libraries or add features to the 267cannot be shared with other Emacs jobs). However, if Emacs will be
268standard ones. Emacs will display a warning about the overflow when 268dumped using the now obsolete @code{unexec} method, the resulting
269it starts. If this happens, you should increase the compilation 269image will work, but garbage collection (@pxref{Garbage Collection})
270is disabled in this situation, causing a memory leak. Such an
271overflow normally won't happen unless you try to preload additional
272libraries or add features to the standard ones. Emacs will display a
273warning about the overflow when it starts, if it was dumped using
274@code{unexec}. If this happens, you should increase the compilation
270parameter @code{SYSTEM_PURESIZE_EXTRA} in the file 275parameter @code{SYSTEM_PURESIZE_EXTRA} in the file
271@file{src/puresize.h} and rebuild Emacs. 276@file{src/puresize.h} and rebuild Emacs.
272 277
@@ -510,9 +515,11 @@ Total heap size, in @var{unit-size} units.
510Heap space which is not currently used, in @var{unit-size} units. 515Heap space which is not currently used, in @var{unit-size} units.
511@end table 516@end table
512 517
513If there was overflow in pure space (@pxref{Pure Storage}), 518If there was overflow in pure space (@pxref{Pure Storage}), and Emacs
514@code{garbage-collect} returns @code{nil}, because a real garbage 519was dumped using the (now obsolete) @code{unexec} method
515collection cannot be done. 520(@pxref{Building Emacs}), then @code{garbage-collect} returns
521@code{nil}, because a real garbage collection cannot be done in that
522case.
516@end deffn 523@end deffn
517 524
518@defopt garbage-collection-messages 525@defopt garbage-collection-messages
diff --git a/src/alloc.c b/src/alloc.c
index 9fbd0d05739..6a17bedc75b 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6050,8 +6050,9 @@ where each entry has the form (NAME SIZE USED FREE), where:
6050- FREE is the number of those objects that are not live but that Emacs 6050- FREE is the number of those objects that are not live but that Emacs
6051 keeps around for future allocations (maybe because it does not know how 6051 keeps around for future allocations (maybe because it does not know how
6052 to return them to the OS). 6052 to return them to the OS).
6053However, if there was overflow in pure space, `garbage-collect' 6053However, if there was overflow in pure space, and Emacs was dumped
6054returns nil, because real GC can't be done. 6054using the 'unexec' method, `garbage-collect' returns nil, because
6055real GC can't be done.
6055See Info node `(elisp)Garbage Collection'. */) 6056See Info node `(elisp)Garbage Collection'. */)
6056 (void) 6057 (void)
6057{ 6058{