[Gc] Error in simple GC test

Andrew Haley aph at redhat.com
Tue Apr 24 01:43:43 PDT 2007

Boehm, Hans writes:
 > > -----Original Message-----
 > > From: gc-bounces at napali.hpl.hp.com 
 > > [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Christophe Meessen
 > > Sent: Monday, April 23, 2007 5:35 AM
 > > To: gc at napali.hpl.hp.com
 > > Subject: Re: [Gc] Error in simple GC test
 > > 
 > > Hello, and thanks for answering.
 > > 
 > > Andrew Haley a écrit :
 > > > If you can't tolerate even a few objects not reclaimed you'll
 > > > have to use a precise collector.

 > And defining precisely what that means may be nontrivial.

Hah, yes it might indeed.

 > > I have seen that work is in progress to integrate a gc in C++ 
 > > for the next standard revision tagged C++0X, where X may be 
 > > in hexadecimal ;-).
 > > Is it intended to be a precise collector ?

 > There are provisions to allow the collector to use type
 > information.  I would expect that initial implementations will do
 > so to a limited extent.  Even if we could define what a "fully
 > precise" collector is, it would run into trouble with C-style
 > unions, if nothing else.

Right.  Although I wasn't there, I understand that there was still a
lot of arguing at last week's Oxford meeting about garbage collection,
and how exactly it is to work isn't yet specified.

 > The standard can't really impose formal requirements in this area,
 > since it doesn't say anything about space usage of your program.


It's very easy to get paranoid about garbage colletion, worrying that
one false pointer might keep huge amounts of memory alive.  While this
is possible in theory, in practice it isn't that much of a problem as
long as application writers are diligent about NULLing references they
no longer need.


Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903

More information about the Gc mailing list