[Gc] GC_finalize_all does not work

Ivan Maidanski ivmai at mail.ru
Sun Dec 7 10:25:05 PST 2008


Hi!

1. If GC_finalize_on_demand and GC_finalizer_notifier are set then GC_finalize_all() may do nothing (in case of last_finalizer_notification == GC_gc_no).

2. If GC_finalize_on_demand and GC_finalizer_notifier are set, and the notifier only wakes up another thread then "while (GC_fo_entries > 0)" may not do the expected thing - keep running finalizers until there are no more left.

Q: Is it specified somewhere in the docs that GC_finalize_all() should call notifier (instead of running finalizers) in the finalize-on-demand mode?
If not then the possible solution is to replace "GC_INVOKE_FINALIZERS()" with "GC_invoke_finalizers()" in GC_finalize_all().

Bye.


More information about the Gc mailing list