Transitioning to a type aware Garbage Collector
Pragma
ericanderton at yahoo.removeme.com
Tue Jan 23 12:34:41 PST 2007
Sean Kelly wrote:
> Paul Findlay wrote:
>> Walter Bright wrote:
>>> To improve GC performance, we need to transition to a GC that is
>>> aware of the types of what it is allocating.
>> Does this mean the D garbage collector will be an exact (or precise)
>> garbage collector?
>
> If a block contains pointers then the entire block will still be scanned
> instead of just the pointers in that block, so It will still be a
> conservative collector but with fewer false positives. I think this
> could be changed so that just the pointers were scanned, but there would
> likely be a noticeable performance hit for doing so.
I was going to say: it sounds an awful lot like Walter is going to have the GC stamp each allocated block (or its
corresponding record) with a field that amounts to "bool containsPointers". I'm all for it. Especially since the
majority of allocations and re-allocations in a typical D program are for strings, images and other non-pointer related
data. This simple change will amount to much smaller GC pauses, especially in the video games department.
> If false positives
> are still a concern (and I'm not convinced they will be), a better
> approach may be to pursue a different GC design such as the CBGC
> mentioned yesterday.
I haven't had a chance to read the paper myself, but the abstract left me with the impression that it's a good
middle-of-the road approach to things.
Just an aside here: I keep reading that as "CBGB".
--
- EricAnderton at yahoo
More information about the Digitalmars-d-announce
mailing list