Newsgroups: alt.lang.design,comp.lang.c,comp.lang.c++,comp.lang.lisp,zer.z-netz.sprachen.algorithmen
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!pipex!dircon!rheged!simon
From: simon@rheged.dircon.co.uk (Simon Brooke)
Subject: Re: Reference Counting (was Re: Searching Method for Incremental Garbage Collection)
Message-ID: <CzKAnH.D3@rheged.dircon.co.uk>
Keywords: storage garbage collection incremental search method
Organization: none. Disorganization: total.
References: <3ai2ol$3ua@gate.fzi.de> <CzHCvp.9rM@rheged.dircon.co.uk> <AST.178.785265972@postman.hsn.no>
Date: Sun, 20 Nov 1994 10:33:14 GMT
Lines: 51
Xref: glinda.oz.cs.cmu.edu comp.lang.c:117442 comp.lang.c++:99834 comp.lang.lisp:15735

In article <AST.178.785265972@postman.hsn.no>,
Alf Steinbach <AST@postman.hsn.no> wrote:
>In article <CzHCvp.9rM@rheged.dircon.co.uk> simon@rheged.dircon.co.uk (Simon Brooke) writes:
>>In article <3ai2ol$3ua@gate.fzi.de>, Ulrike Koelsch <koelsch@fzi.de> wrote:
>>>Hello everybody,
>>>
>>>I am searching for a method of incremental garbage collection working on the 
>>>storage of an object-oriented database system.
>>>
>>I've always believed that a reference counting garbage collector had a
>>lot going for it, particularly in systems which require continuous
>
>Reference counting DOES NOT WORK when you have circular data structures,
>which almost every program has.  Thus, reference counting is a special
>case solution, to be used *within a program*, like the concept of a
>free-list or whatever other specialized memory management.
>
>I'm surprised that so many people have been recommending reference
>counting garbage collection in this conference (if I've understood the
>mailings about "intelligent pointers" correctly).  What's the state of
>computer science education when ideas like this can flourish like they do?

Well, my education is still at fault, because although you are very
clear that my idea does not work, you haven't told me why. Would
somebody care to do so?

After all, circular data structures hit most (all?) garbage collecting
strategies. Anything in a circular structure necessarily does still
have a pointer to it, even if nothing still 'live' points to any part
of it. If there is a computationally tractable solution to this
problem, please inform us of it (I'm not being rhetorical here: I
don't know, but would be pleased to learn).

In the meantime, circular structures being admitted as a problem, why
is the reference counting solution to be condemned out of hand?
Mark-and-sweep would fail in just the same circumstances, and so, if I
understand it at all, would a conventional generational strategy.
Furthermore, programs which habitually create circular structures and
then forget about them are (in my expreience) rare. Some silting of
memory may occur as a result of this sort of problem, but for it to
become so severe as to render a system inoperable ('DOES NOT WORK')
seems unlikely. Can anyone advance evidence to support this position?

Cheers

Simon
-- 
------- simon@rheged.dircon.co.uk

	Is this the only house in the world with hot and cold running 
	usenet, but no running water?
