diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/alloc.c b/src/alloc.c index f69c65dedc1..d3f696d5ade 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -6279,11 +6279,6 @@ garbage_collect (void) | |||
| 6279 | image_prune_animation_caches (false); | 6279 | image_prune_animation_caches (false); |
| 6280 | #endif | 6280 | #endif |
| 6281 | 6281 | ||
| 6282 | /* ELisp code run by `gc-post-hook' could result in itree iteration, | ||
| 6283 | which must not happen while the itree is already busy. See | ||
| 6284 | bug#58639. */ | ||
| 6285 | eassert (!itree_iterator_busy_p ()); | ||
| 6286 | |||
| 6287 | if (!NILP (Vpost_gc_hook)) | 6282 | if (!NILP (Vpost_gc_hook)) |
| 6288 | { | 6283 | { |
| 6289 | specpdl_ref gc_count = inhibit_garbage_collection (); | 6284 | specpdl_ref gc_count = inhibit_garbage_collection (); |
| @@ -6508,7 +6503,7 @@ mark_char_table (struct Lisp_Vector *ptr, enum pvec_type pvectype) | |||
| 6508 | static void | 6503 | static void |
| 6509 | mark_overlay (struct Lisp_Overlay *ov) | 6504 | mark_overlay (struct Lisp_Overlay *ov) |
| 6510 | { | 6505 | { |
| 6511 | /* We don't mark the `interval_node` object, because it is managed manually | 6506 | /* We don't mark the `itree_node` object, because it is managed manually |
| 6512 | rather than by the GC. */ | 6507 | rather than by the GC. */ |
| 6513 | eassert (BASE_EQ (ov->interval->data, make_lisp_ptr (ov, Lisp_Vectorlike))); | 6508 | eassert (BASE_EQ (ov->interval->data, make_lisp_ptr (ov, Lisp_Vectorlike))); |
| 6514 | set_vectorlike_marked (&ov->header); | 6509 | set_vectorlike_marked (&ov->header); |
| @@ -7780,13 +7775,23 @@ allocated since the last garbage collection. All data types count. | |||
| 7780 | Garbage collection happens automatically only when `eval' is called. | 7775 | Garbage collection happens automatically only when `eval' is called. |
| 7781 | 7776 | ||
| 7782 | By binding this temporarily to a large number, you can effectively | 7777 | By binding this temporarily to a large number, you can effectively |
| 7783 | prevent garbage collection during a part of the program. | 7778 | prevent garbage collection during a part of the program. But be |
| 7779 | sure to get back to the normal value soon enough, to avoid system-wide | ||
| 7780 | memory pressure, and never use a too-high value for prolonged periods | ||
| 7781 | of time. | ||
| 7784 | See also `gc-cons-percentage'. */); | 7782 | See also `gc-cons-percentage'. */); |
| 7785 | 7783 | ||
| 7786 | DEFVAR_LISP ("gc-cons-percentage", Vgc_cons_percentage, | 7784 | DEFVAR_LISP ("gc-cons-percentage", Vgc_cons_percentage, |
| 7787 | doc: /* Portion of the heap used for allocation. | 7785 | doc: /* Portion of the heap used for allocation. |
| 7788 | Garbage collection can happen automatically once this portion of the heap | 7786 | Garbage collection can happen automatically once this portion of the heap |
| 7789 | has been allocated since the last garbage collection. | 7787 | has been allocated since the last garbage collection. |
| 7788 | |||
| 7789 | By binding this temporarily to a large number, you can effectively | ||
| 7790 | prevent garbage collection during a part of the program. But be | ||
| 7791 | sure to get back to the normal value soon enough, to avoid system-wide | ||
| 7792 | memory pressure, and never use a too-high value for prolonged periods | ||
| 7793 | of time. | ||
| 7794 | |||
| 7790 | If this portion is smaller than `gc-cons-threshold', this is ignored. */); | 7795 | If this portion is smaller than `gc-cons-threshold', this is ignored. */); |
| 7791 | Vgc_cons_percentage = make_float (0.1); | 7796 | Vgc_cons_percentage = make_float (0.1); |
| 7792 | 7797 | ||