diff options
| author | Eli Zaretskii | 2025-07-28 16:14:44 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2025-07-28 16:14:44 +0300 |
| commit | 8ec2ddebdd4ff92aa07a9a7a0881bd3e762acee3 (patch) | |
| tree | 757e7ca33975d2a32fd572d42ec9ef8a296b132e | |
| parent | 57a9798c22a6d8a75883dfcc1c4430be428d20bb (diff) | |
| download | emacs-8ec2ddebdd4ff92aa07a9a7a0881bd3e762acee3.tar.gz emacs-8ec2ddebdd4ff92aa07a9a7a0881bd3e762acee3.zip | |
; Update documentation of GC in ELisp manual
* doc/lispref/internals.texi (Garbage Collection): Update default
values for GC-related thresholds. (Bug#79074)
| -rw-r--r-- | doc/lispref/internals.texi | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index cc82a03db98..939cd489241 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -555,16 +555,17 @@ object type; space allocated to the contents of buffers does not count. | |||
| 555 | 555 | ||
| 556 | The initial threshold value is @code{GC_DEFAULT_THRESHOLD}, defined in | 556 | The initial threshold value is @code{GC_DEFAULT_THRESHOLD}, defined in |
| 557 | @file{alloc.c}. Since it's defined in @code{word_size} units, the | 557 | @file{alloc.c}. Since it's defined in @code{word_size} units, the |
| 558 | value is 400,000 for the default 32-bit configuration and 800,000 for | 558 | value is 400,000 for the default 32-bit configuration, and 800,000 for |
| 559 | the 64-bit one. If you specify a larger value, garbage collection | 559 | the 64-bit one and for 32-bit builds configured with the |
| 560 | will happen less often. This reduces the amount of time spent garbage | 560 | @option{--with-wide-int} option. If you specify a larger value, garbage |
| 561 | collecting (so Lisp programs will run faster between cycles of garbage | 561 | collection will happen less often. This reduces the amount of time |
| 562 | collection that happen more rarely), but increases total memory use. | 562 | spent garbage collecting (so Lisp programs will run faster between |
| 563 | You may want to do this when running a program that creates lots of | 563 | cycles of garbage collection that happen more rarely), but increases |
| 564 | Lisp data, especially if you need it to run faster. However, we | 564 | total memory use. You may want to do this when running a program that |
| 565 | recommend against increasing the threshold for prolonged periods of | 565 | creates lots of Lisp data, especially if you need it to run faster. |
| 566 | time, and advise that you never set it higher than needed for the | 566 | However, we recommend against increasing the threshold for prolonged |
| 567 | program to run in reasonable time. Using thresholds higher than | 567 | periods of time, and advise that you never set it higher than needed for |
| 568 | the program to run in reasonable time. Using thresholds higher than | ||
| 568 | necessary could potentially cause higher system-wide memory pressure, | 569 | necessary could potentially cause higher system-wide memory pressure, |
| 569 | and also make each garbage-collection cycle take much more time, and | 570 | and also make each garbage-collection cycle take much more time, and |
| 570 | should therefore be avoided. | 571 | should therefore be avoided. |
| @@ -585,6 +586,10 @@ As the heap size increases, the time to perform a garbage collection | |||
| 585 | increases. Thus, it can be desirable to do them less frequently in | 586 | increases. Thus, it can be desirable to do them less frequently in |
| 586 | proportion. | 587 | proportion. |
| 587 | 588 | ||
| 589 | The initial percentage value is 0.1 in interactive sessions and while | ||
| 590 | dumping Emacs (@pxref{Building Emacs}), and 1.0 in non-interactive | ||
| 591 | (a.k.a.@: ``batch'') sessions. | ||
| 592 | |||
| 588 | As with @code{gc-cons-threshold}, do not enlarge this more than | 593 | As with @code{gc-cons-threshold}, do not enlarge this more than |
| 589 | necessary, and never for prolonged periods of time. | 594 | necessary, and never for prolonged periods of time. |
| 590 | @end defopt | 595 | @end defopt |