Root set is a set that contains object pointers from stacks, registers and global (static) variables. The root set is the collection of roots in a object reference graph (may be a forest of trees). All objects reachable from the root set are marked as live.
Dan Lo On Wed, 20 Feb 2002, Sanjiv Kumar Gupta wrote: > > I am trying to understand the implementation of the Kaffe garbage collector. > The first step of the Mark phase there is to wall all root Objects and mark > them as grey. Could anybody tell me what do we mean by root Objects or root > set etc. and why do we start marking from them. > > Regards > Sanjiv > > -----Original Message----- > From: wang wenzhong [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 31, 2001 2:14 PM > To: [EMAIL PROTECTED] > Subject: garbage collector > > > > > The garbage collector begin its mark phase from scaning and marking > registered root references object,then walk and mark other reachable > objects. > > The file gcRefs.c defines two functions:gc_add_ref and gc_rm_ref,the first > one add a persistent reference to an object (stored in a hashtable ),the > next function remove a persistent reference to an object. > > I know many functions invoke gc_add_ref to add a references to an object,but > I hardly find corresponding invoking about gc_rm_ref . > > I want to know,how garbage collector (or kaffe ?) maintain it's hashtable of > root references object(not only add,but also delete) ? > > thanks >
