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

Wolfgang Draxinger Wolfgang.Draxinger at physik.uni-muenchen.de
Fri Feb 15 03:25:10 PST 2013


I'm currently implementing a library which frontend API does almost
everything through opaque, augmented, numeric handles. Internally the
handles are mapped to the actual objects then. The concept loosely
follows the way OpenGL manages internal objects (textures, buffers and

The library itself does not use Boehm GC, as its own internal handle
based object management also doubles as a mark-sweep system for object
deallocation. However it may be used in programs, that actually do use
Boehm GC and now I'm wondering, how my handle values may clash with
pointer identification.

Since the handle values are augmented anyway, i.e. several bits of the
handle value designate the object type and other attributes which are
used to discard invalid handle values early before even looking them
up in the mapping to objects, I have a well defined interface in which I
can make several modifications to the bit patterns actually stored. This
would allow me to transform the numeric values in a way, that they don't
clash with Boehm GC, if this actually is a problem.



More information about the Gc mailing list