aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorEli Zaretskii2022-11-20 13:10:08 +0200
committerEli Zaretskii2022-11-20 13:10:08 +0200
commit7b09ed28ba395030e5117344bb5b97b8ee4a8b40 (patch)
tree4c985a26cd19ec4acece5acc8033b26f5e544865 /src/alloc.c
parentfbad9c05ea1066c0ae48d40eca782bd406e4c42d (diff)
downloademacs-7b09ed28ba395030e5117344bb5b97b8ee4a8b40.tar.gz
emacs-7b09ed28ba395030e5117344bb5b97b8ee4a8b40.zip
Advise against using too-high GC thresholds
* doc/lispref/internals.texi (Garbage Collection): * src/alloc.c (syms_of_alloc) <gc-cons-threshold> <gc-cons-percentage>: Advise against enlarging the GC thresholds more than needed and for prolonged periods of time.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c
index b9d12dff7e0..d3f696d5ade 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -7775,13 +7775,23 @@ allocated since the last garbage collection. All data types count.
7775Garbage collection happens automatically only when `eval' is called. 7775Garbage collection happens automatically only when `eval' is called.
7776 7776
7777By binding this temporarily to a large number, you can effectively 7777By binding this temporarily to a large number, you can effectively
7778prevent garbage collection during a part of the program. 7778prevent garbage collection during a part of the program. But be
7779sure to get back to the normal value soon enough, to avoid system-wide
7780memory pressure, and never use a too-high value for prolonged periods
7781of time.
7779See also `gc-cons-percentage'. */); 7782See also `gc-cons-percentage'. */);
7780 7783
7781 DEFVAR_LISP ("gc-cons-percentage", Vgc_cons_percentage, 7784 DEFVAR_LISP ("gc-cons-percentage", Vgc_cons_percentage,
7782 doc: /* Portion of the heap used for allocation. 7785 doc: /* Portion of the heap used for allocation.
7783Garbage collection can happen automatically once this portion of the heap 7786Garbage collection can happen automatically once this portion of the heap
7784has been allocated since the last garbage collection. 7787has been allocated since the last garbage collection.
7788
7789By binding this temporarily to a large number, you can effectively
7790prevent garbage collection during a part of the program. But be
7791sure to get back to the normal value soon enough, to avoid system-wide
7792memory pressure, and never use a too-high value for prolonged periods
7793of time.
7794
7785If this portion is smaller than `gc-cons-threshold', this is ignored. */); 7795If this portion is smaller than `gc-cons-threshold', this is ignored. */);
7786 Vgc_cons_percentage = make_float (0.1); 7796 Vgc_cons_percentage = make_float (0.1);
7787 7797