Necessary of refTable in GC

Tim Wilkinson tim at tjwassoc.co.uk
Mon Mar 24 03:42:19 PST 1997


On Mon, 24 Mar 1997, Frank Mehnert wrote:

> while looking at the GC I thought: For what we need the refTable?
> I think the only one think is to check if one given object is valid:
> Take the ref field of the object as an index to refTable (GETREF). If 
> the indexed entry points to the object, this object is valid. Why we
> don't let point the ref field to the start of object or set it to a magic
> number? We could save the refTable...

Since the majority of the GC is currently conservative, it's necessary
to identify objects references with some accuracy - it's not too bad
if we incorrectly find a reference to an object, but it is bad if we
incorrectly find a reference to an object which doesn't really exists.
The ref table is necessary to guaranteee this, a magic number would only give
us probablistic protection and doesn't prevent thinking we've found
objects which are bogus.

Tim

--
  Tim Wilkinson                         Tel/Fax: +44 181 440 0658
  T. J. Wilkinson & Associates,         Mobile:  +44 370 621006
  London, UK.                           Email:   tim at tjwassoc.co.uk



More information about the kaffe mailing list