Newsgroups: comp.lang.lisp,comp.lang.c,comp.lang.c++
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!solaris.cc.vt.edu!swiss.ans.net!howland.reston.ans.net!gatech!concert!sas!mozart.unx.sas.com!sasmsr
From: sasmsr@zinfande.unx.sas.com (Mark S. Riggle)
Subject: Re: Reference Counting (was Re: Searching Method for Incremental Garbage Collection)
Originator: sasmsr@zinfande.unx.sas.com
Sender: news@unx.sas.com (Noter of Newsworthy Events)
Message-ID: <CzotHF.HqA@unx.sas.com>
Date: Tue, 22 Nov 1994 21:10:27 GMT
References: <3ai2ol$3ua@gate.fzi.de> <CzHCvp.9rM@rheged.dircon.co.uk> <3aqur0$l9r@news.parc.xerox.com>
Nntp-Posting-Host: zinfande.unx.sas.com
Organization: SAS Institute Inc. Cary NC
Keywords: storage garbage collection incremental search method
Lines: 32
Xref: glinda.oz.cs.cmu.edu comp.lang.lisp:15766 comp.lang.c:117536 comp.lang.c++:99960


In article <3aqur0$l9r@news.parc.xerox.com>, boehm@parc.xerox.com (Hans Boehm) writes:
|
|> 
|> 1. You need to guarantee that there are no cycles or provide a reasonable
|> backup collector.
|> 


There is a backup collector for reference counts that does not need to
access the stack or registers as most other collectors need to.  The
clever idea is: for each object on the heap, subtract the number of
references from other objects in the heap from the reference count for
that object.  Objects that now have a non-zero count are the base
objects  from which to start a mark-phase followed by a sweep phase.
The reference counts are then restored to the remaining objects.  The
drawback it it may examine each object on the heap up to 4 times and the
reference count field needs to be large enough to hold a pointer.


See Thomas Christoper,
 "Reference Count Garbage Collection" 
Software Practice and Experience, Vol. 14(6) 503-507 (June 1984)
-- 
=========================================================
Mark Riggle                         | "Give me LAMBDA or
sasmsr@unx.sas.com                  |  give me death"
SAS Institute Inc.,                 |
SAS Campus Drive, Cary, NC, 27513   |  
(919) 677-8000                      |


