diff options
| author | Eli Zaretskii | 2019-12-14 20:02:11 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2019-12-14 20:02:11 +0200 |
| commit | a01a7222829682962a229e26688a4d44829b6d5f (patch) | |
| tree | dc44351e8647a67cb7b4876968804c2cbd791de2 | |
| parent | 0eff1a0191fc489debfcce1b695937112608718a (diff) | |
| download | emacs-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.texi | 25 | ||||
| -rw-r--r-- | src/alloc.c | 5 |
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 | |||
| 261 | machine at once. Pure storage is not expandable; a fixed amount is | 261 | machine at once. Pure storage is not expandable; a fixed amount is |
| 262 | allocated when Emacs is compiled, and if that is not sufficient for | 262 | allocated when Emacs is compiled, and if that is not sufficient for |
| 263 | the preloaded libraries, @file{temacs} allocates dynamic memory for | 263 | the preloaded libraries, @file{temacs} allocates dynamic memory for |
| 264 | the part that didn't fit. The resulting image will work, but garbage | 264 | the part that didn't fit. If Emacs will be dumped using the |
| 265 | collection (@pxref{Garbage Collection}) is disabled in this situation, | 265 | @code{pdump} method (@pxref{Building Emacs}), the pure-space overflow |
| 266 | causing a memory leak. Such an overflow normally won't happen unless | 266 | is of no special importance (it just means some of the preloaded stuff |
| 267 | you try to preload additional libraries or add features to the | 267 | cannot be shared with other Emacs jobs). However, if Emacs will be |
| 268 | standard ones. Emacs will display a warning about the overflow when | 268 | dumped using the now obsolete @code{unexec} method, the resulting |
| 269 | it starts. If this happens, you should increase the compilation | 269 | image will work, but garbage collection (@pxref{Garbage Collection}) |
| 270 | is disabled in this situation, causing a memory leak. Such an | ||
| 271 | overflow normally won't happen unless you try to preload additional | ||
| 272 | libraries or add features to the standard ones. Emacs will display a | ||
| 273 | warning about the overflow when it starts, if it was dumped using | ||
| 274 | @code{unexec}. If this happens, you should increase the compilation | ||
| 270 | parameter @code{SYSTEM_PURESIZE_EXTRA} in the file | 275 | parameter @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. | |||
| 510 | Heap space which is not currently used, in @var{unit-size} units. | 515 | Heap space which is not currently used, in @var{unit-size} units. |
| 511 | @end table | 516 | @end table |
| 512 | 517 | ||
| 513 | If there was overflow in pure space (@pxref{Pure Storage}), | 518 | If there was overflow in pure space (@pxref{Pure Storage}), and Emacs |
| 514 | @code{garbage-collect} returns @code{nil}, because a real garbage | 519 | was dumped using the (now obsolete) @code{unexec} method |
| 515 | collection 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 | ||
| 522 | case. | ||
| 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). |
| 6053 | However, if there was overflow in pure space, `garbage-collect' | 6053 | However, if there was overflow in pure space, and Emacs was dumped |
| 6054 | returns nil, because real GC can't be done. | 6054 | using the 'unexec' method, `garbage-collect' returns nil, because |
| 6055 | real GC can't be done. | ||
| 6055 | See Info node `(elisp)Garbage Collection'. */) | 6056 | See Info node `(elisp)Garbage Collection'. */) |
| 6056 | (void) | 6057 | (void) |
| 6057 | { | 6058 | { |