[Gc] How does Boehm GC identify values as pointers?

Wolfgang Draxinger Wolfgang.Draxinger at physik.uni-muenchen.de
Mon Feb 18 05:40:05 PST 2013

On 02/18/13 10:06, Andy Wingo wrote:
> On Fri 15 Feb 2013 12:25, Wolfgang Draxinger<Wolfgang.Draxinger at physik.uni-muenchen.de>  writes:
>> I'm wondering, how my handle values may clash with pointer
>> identification.
> One way to be sure that they don't clash is to give your handles some
> low-order tag bits.  By default the BDW GC only marks pointers to the
> start of an object, and all object allocations are 8-byte aligned, so
> any value with a 1 in any of the 3 low bits will not be treated as a
> pointer.

Thanks, this is exactly the kind of information I was hoping for. Since 
I planned to give handles some magic bits anyway, this is the place 
where they'll go.



More information about the Gc mailing list