From: John Max Skaller (skaller_at_[hidden])
Date: 2001-05-26 13:59:31
Bjarne Stroustrup wrote:
> John Max Skaller <skaller_at_[hidden]> writes:
> > Using Boehm, you can register these objects
> > as roots, and unregister them. But that defeats the
> > principal advantage of Boehm, namely, transparency.
> But you can't be transparent if you want to keep live objects known only to
> external entities.
That's right. However, if you agree to give up transparency,
one of the major _disadvantages_ of other collection techniques,
compared with Boehm, disappears.
> > A second problem with Boehm is that it is global,
> Again, this is not a problem unique to a conservative collector.
It remains a disadvantage, whether or not it is unique.
It is also a disadvantage of Greg Colvins cyclic_ptr, on the other
hand my Felix GC system is instance based, and so if one
has an instance per thread (for thread local storage only),
then only the thread gets stopped.
I will add that the collector that comes with the Ocaml
system I'm using is generational and incremental.
> This is theory.
That is correct. I haven't done any measurements.
> One nice thing about a conservative collector is
> that it doesn't impose a cost on ordinary use of objects - such as requiring
> than every object be accessed through a pointer to its first element or
> requiring that every object contain space for use by a garbage collector.
Yes. I agree. And one of the nasty things is that
you cannot rely on it to release objects, which makes
resource release by finalisation problematic.
-- John (Max) Skaller, mailto:skaller_at_[hidden] 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk