Path: utzoo!attcan!uunet!ginosko!gem.mps.ohio-state.edu!uwm.edu!rutgers!cmcl2!lanl!opus!ted
From: ted@nmsu.edu (Ted Dunning)
Newsgroups: comp.sw.components
Subject: Re: Garbage Collection & ADTs
Message-ID: 
Date: 27 Sep 89 19:46:44 GMT
References: <911@scaup.cl.cam.ac.uk> <6589@hubcap.clemson.edu> <2079@hydra.gatech.EDU> <8012@cbmvax.UUCP>
Sender: news@nmsu.edu
Organization: NMSU Computer Science
Lines: 23
In-reply-to: jesup@cbmvax.UUCP's message of 27 Sep 89 01:29:39 GMT


In article <8012@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes:


   But GC is unlikely to reclaim that storage.  Yes, the graph no
   longer has pointers to the disconnected subgraph.  However, the
   subgraph may be circular (you said it was cyclic), so all the nodes
   of the subgraph may still have references to them.  Can current GC
   systems recognize such a loop and remove it in it's entirety?  How
   complex can such a loop be and still be recognized?

a modern gc only worries about references from currently accessible
variables, and thus an unreferenced cycle can be arbitrarily complex
and still be reclaimed.  reference counting systems have trouble with
loops and since they usually have only a few bits of reference count,
they also tend to saturate easily.  for this reason, they will
occasionally stop and do a normal garbage collection.


--
ted@nmsu.edu
			remember, when extensions and subsets are outlawed,
			only outlaws will have extensions or subsets