* Finalizers and incremental GC
[not found] <87ee0672hg.fsf.ref@yahoo.com>
@ 2022-06-03 5:14 ` Po Lu
2022-06-03 12:16 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Po Lu @ 2022-06-03 5:14 UTC (permalink / raw)
To: emacs-devel
In my incremental garbage collector, finalizers are currently run every
time a finalizer is swept. This means every time Emacs enters garbage
collection during the sweeping phase, only a small amount of finalizers
are run.
Would it make more sense to run all the finalizers at once, after all
white objects are swept and a garbage collection cycle completes, like
the current garbage collector?
I can't seem to find any code in the wild actually using finalizers.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Finalizers and incremental GC
2022-06-03 5:14 ` Finalizers and incremental GC Po Lu
@ 2022-06-03 12:16 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2022-06-03 12:16 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
> Would it make more sense to run all the finalizers at once, after all
> white objects are swept and a garbage collection cycle completes, like
> the current garbage collector?
It shouldn't matter, so which ever is easiest or most efficient is
probably the better option. A secondary concern is to run the finalizers
as soon as possible.
IOW, what you do now is probably the better option,
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-03 12:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <87ee0672hg.fsf.ref@yahoo.com>
2022-06-03 5:14 ` Finalizers and incremental GC Po Lu
2022-06-03 12:16 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).