Conservative/precise GC

Alexandre Oliva oliva at dcc.unicamp.br
Sat Jan 30 20:10:19 PST 1999


On Jan 30, 1999, D.W.Hughes at exeter.ac.uk wrote:

> What exactly are the semantics of the GC_ALLOC_FIXED option to
> gc_malloc?  Is it a hint that the new object has no references to
> other objects (hence walkNull), or is it to tell a moving collector
> that the object shouldn't be moved?  Or is it something else?

It means that the garbage collector shouldn't ever free this object by
itself, the caller is promising to take care of gc_free()ing it.

> On the same note, what exactly is the difference between
> GC_ALLOC_NORMAL and GC_NORMAL_OBJECT?  (As of kaffe-1.0.b3, the only
> mention of GC_ALLOC_NORMAL in the code is for the allocation of the
> UTF8 constant intern hash-table.)

GC_ALLOC_NORMAL was supposed to be walked by a conservative walking
function, whereas GC_NORMAL_OBJECT could assume the referred object
was going to be a Java object, and thus walk it precisely.  That's
what the current CVS tree does.

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil



More information about the kaffe mailing list