* src/alloc.c (garbage_collect): Run post-gc-hook
later (bug#65700)
This commit is contained in:
parent
ff87aecf85
commit
1e1f3e30ef
2 changed files with 9 additions and 7 deletions
2
etc/NEWS
2
etc/NEWS
|
@ -831,6 +831,8 @@ the file listing's performance is still optimized.
|
|||
|
||||
* Incompatible Lisp Changes in Emacs 30.1
|
||||
|
||||
** 'post-gc-hook' runs after updating 'gcs-done' and `'gcs-elapsed'.
|
||||
|
||||
---
|
||||
** The escape sequence '\x' not followed by hex digits is now an error.
|
||||
Previously, '\x' without at least one hex digit denoted character code
|
||||
|
|
14
src/alloc.c
14
src/alloc.c
|
@ -6595,13 +6595,6 @@ garbage_collect (void)
|
|||
image_prune_animation_caches (false);
|
||||
#endif
|
||||
|
||||
if (!NILP (Vpost_gc_hook))
|
||||
{
|
||||
specpdl_ref gc_count = inhibit_garbage_collection ();
|
||||
safe_run_hooks (Qpost_gc_hook);
|
||||
unbind_to (gc_count, Qnil);
|
||||
}
|
||||
|
||||
/* Accumulate statistics. */
|
||||
if (FLOATP (Vgc_elapsed))
|
||||
{
|
||||
|
@ -6620,6 +6613,13 @@ garbage_collect (void)
|
|||
if (tot_after < tot_before)
|
||||
malloc_probe (min (tot_before - tot_after, SIZE_MAX));
|
||||
}
|
||||
|
||||
if (!NILP (Vpost_gc_hook))
|
||||
{
|
||||
specpdl_ref gc_count = inhibit_garbage_collection ();
|
||||
safe_run_hooks (Qpost_gc_hook);
|
||||
unbind_to (gc_count, Qnil);
|
||||
}
|
||||
}
|
||||
|
||||
DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "",
|
||||
|
|
Loading…
Add table
Reference in a new issue