[Gc] Fwd: Re: [bdwgc] 7.4.0: disclaim_tes t always fails (#42)
Ivan Maidanski <ivmai-JGs/[email protected]> Tue, 27 May 2014 00:34:02 +0400
| Newsgroups | gmane.comp.programming.garbage-collection.boehmgc |
|---|---|
| Message-ID | <[email protected]> |
Forwarding to ML... -------- Forwarded message -------- From: Petter Urkedal <[email protected]> The reason is that the lowest bits of the first word is used to distinguish a previously freed object from one which just became free in order to decide whether or not to run the finalizer. Other object kinds don't have this issues, as they don't run any effect in relation to re-building free-lists. The old free-list is discarded, so whether an object was previously freed or just become free does not matter. Now, we could make the same distinction using the last word, but the first-word assumption is used in mark.c:1808 (GC_push_unconditionally) which is the real bug if you look at it from that point of view. So, the question is what the API should be, considering that we're not only speaking of GC_finalized_malloc. I see the disclaim functionality as three distinct features: * The possibility of registering a type with a callback which is invoked on unreachable objects. * The option to trace from the same object unconditionally, to make sure the above notifier sees only valid pointers. * The GC_finalized_malloc built on top of these two. I mainly use the first to implement hash-consing. From a functionality point if view, we could in fact drop the condition at mark.c:1808, but it would mean pushing free objects onto the mark stack. That probably has significant performance impact. I'm wondering if there is a better solution. — Reply to this email directly or view it on GitHub . _______________________________________________ bdwgc mailing list [email protected] https://lists.opendylan.org/mailman/listinfo/bdwgc