From: | stephen@dino.dnsalias.com (Stephen J. Bevan) |
Newsgroups: | comp.compilers |
Date: | 17 Jul 2003 00:16:57 -0400 |
Organization: | just me at home |
References: | 03-05-211 03-06-015 03-06-054 03-06-057 03-06-078 03-06-106 03-07-023 03-07-037 03-07-066 |
Keywords: | storage, GC |
Posted-Date: | 17 Jul 2003 00:16:57 EDT |
Joachim Durchholz <joachim.durchholz@web.de> writes:
> Mark Alexander Wotton wrote:
> > (Idle thought: seeing as the only way to create circular references is
> > through mutable references in a strict language, or tying the knot in
> > a lazy one, perhaps reference counting would be useful for a strict
> > purely functional language.)
>
> AFAIK, all such languages use mark-and-sweep collectors.
>
> I'm not sure about the exact reasons. I could imagine that it's just
> a case of "reference counting is beneath contempt", or a case of
> "mark-and-sweep was measured to be just as fast as reference
> counting", or simply "we want to avoid the analysis overhead of
> assigning ownership to objects when writing our run-time system".
The OCS implementation of Opal <http://uebb.cs.tu-berlin.de/~opal/>
uses reference counting. I remember reading an explanation of why
this was done sometime in the 90s, but right now all I can find is
<http://uebb.cs.tu-berlin.de/~opal/ocs/doc/html/hcguide.html> which
contains :-
OCS uses an enhanced lazy reference counting approach to memory
management which results in a residual garbage collector, that is,
the garbage collector is compiled online into the code.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.