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

Carsten Kehler Holst ckh at pdc.dk
Mon Feb 18 04:51:27 PST 2013


Only if you don't allow interior pointers.
In Visual Prolog we use them both for objects and strings.
Regards
Carsten Kehler Holst

-----Original Message-----
From: gc-bounces at linux.hpl.hp.com [mailto:gc-bounces at linux.hpl.hp.com] On Behalf Of Andy Wingo
Sent: 18. februar 2013 10:06
To: Wolfgang Draxinger
Cc: Boehm GC
Subject: Re: [Gc] How does Boehm GC identify values as pointers?

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.

Andy
--
http://wingolog.org/
_______________________________________________
Gc mailing list
Gc at linux.hpl.hp.com
http://www.hpl.hp.com/hosted/linux/mail-archives/gc/


This message has been scanned for malware by Websense. www.websense.com



More information about the Gc mailing list