[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

Garbage collection & zeroed memory



Based on the responses I've gotten back and several conversations, I'm
inclined to go with an internal assumption in our garbage collection
code that zeroed memory does correspond to a NULL pointer.  It will be
awhile before we port to a machine for which this isn't true, and
there have been enough good ideas about how we can probably deal with
those cases that I'm confident we can figure it out then.  I don't
expect any single portable solution, just different kludges for
different pointer architectures.  As Roger points out, we don't
actually need zeroed memory to be a NULL pointer, we only need the
garbage collector to be able to distinguish it from all valid non-NULL
pointers.  I bet we encounter no machines which run a lot of other
portable C code on which we cannot arrange this somehow.