Related articles |
---|
Best Ref-counting algorithms? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2009-07-12) |
Re: Best Ref-counting algorithms? haberg_20080406@math.su.se (Hans Aberg) (2009-07-13) |
Re: Best Ref-counting algorithms? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2009-07-13) |
Re: Best Ref-counting algorithms? cr88192@hotmail.com (BGB / cr88192) (2009-07-13) |
Re: Best Ref-counting algorithms? torbenm@pc-003.diku.dk (2009-07-14) |
Re: Best Ref-counting algorithms? lerno@dragonascendant.com (=?ISO-8859-1?Q?Christoffer_Lern=F6?=) (2009-07-14) |
Re: Best Ref-counting algorithms? haberg_20080406@math.su.se (Hans Aberg) (2009-07-14) |
Re: Best Ref-counting algorithms? georgeps@xmission.com (GPS) (2009-07-14) |
[32 later articles] |
From: | Hans Aberg <haberg_20080406@math.su.se> |
Newsgroups: | comp.compilers |
Date: | Mon, 13 Jul 2009 13:16:12 +0200 |
Organization: | Aioe.org NNTP Server |
References: | 09-07-018 |
Keywords: | GC |
Posted-Date: | 13 Jul 2009 07:21:08 EDT |
Christoffer LernC6 wrote:
> I'm looking into GC using ref-counting.
>
> Does anyone know what passes for state-of-the-art when it comes to ref-
> counting algorithms?
> I've read papers by Lins 2003 "Lazy Cyclic Reference Counting",
> Bacon / Rajan 2001 "Concurrent Cycle Collection in Reference Counted
> Systems" and a few others.
>
> If one would like to implement a fast GC using refcounting, should I
> implement something like in those papers, or are there better
> algorithms out there?
It depends on what resources you want to collect, and what
implementation language you are choosing. If resources that should
take a place at a specific time, like open files that should be closed
in a C++ style destructor, that may force ordinary reference counts,
as it may be hard to detect the point in time the last reference is
used.
A quick scan on the first paper above gives the impression that it
uses a mark-scan from the root set. If the implementation language is
C++, the problem is that there is no good way to find this root set
(but perhaps in the next revision); the language does not
cooperate. But if one can find it, any type of GC would do.
The approaches might be combined: reference counts for the
destructors, and another GC to collect the memory resources (with
finalizers).
Hans
Return to the
comp.compilers page.
Search the
comp.compilers archives again.