Jeff Clites wrote:
Hi Leo:

I was reading over you incremental GC posts from about a month ago, and read the referenced paper--quite nice work you've done in implementing the ideas there.

I have one question: What about finalizers? I may have just missed it, but it would seem that calling finalizers would require another sweep over the items newly resident on the free list (the left-over items in the from-space), which would (unfortunately) take time proportional to the number of freed object.

I think that the destroy and finalize actions should get separated, the latter would be a new vtable. The C<destroy> vtable is responsible for freeing system resources like malloced memory. C<finalize> should do more highlevel destruction like closing DB connections.


Objects that have finalizers would need special handling (as well as objects that need timely destruction). We could probably allocate such objects from a special PMC pool, so that we don't have to sweep over all PMCs.
There is of course still the problem of ordered finalization and destruction.


leo



Reply via email to