[Gc] About "Disclaim" patch for BDWGC

Petter Urkedal urkedal at nbi.dk
Sat Sep 10 07:52:04 PDT 2011


On 2011-09-10, Ivan Maidanski wrote:
> Hi Petter,
> 
> I think it would be ok if you send me a merge request for this (to master branch).

Great.  I just rebased, made some smaller fixes, and added a copyright
notice (assumed it should be assigned to HP, as the later ones are).
I'll send a merge request in a moment, which will include my own
history.  If you prefer not to see my mistakes, I can truncate it to a
single commit ;-)

> I've recently changed GC version in master to 7.3alpha1 i.e. the branch serves as the next release development branch, while "release" is now set to 7.2alpha7 and only bug fixes will be applied to it until final GC release. (Same for libatomic_ops).

Sounds like the right time.  I should be fairly available in the near
future for questions and adjustments.

I didn't find a better solution to the problem (posed to the disclaim
callback) of determining whether an object has already been finalized,
without making intrusive changes.  Such changes might be

  - storing individual free-lists on each block, so that they can be
    used reliably while scanning the block to avoid unnecessary disclaim
    invocations, or

  - adding a bit-vector similar to the mark bits/bytes which determines
    whether or not to call the disclaim callback.

An interesting variant of the latter would be to use bytes which
identify up to 255 finalizers, allowing different libraries to share the
same object kind for their finalization-dispatching.  However, in the
interest of keeping it simple, I suggest we go with the current option.
A future solution will probably not break the API, but only relax it.


More information about the Gc mailing list