From: Alex Besogonov (cyberax_at_[hidden])
Date: 2006-09-05 16:07:50
David Abrahams wrote:
>> There's another possible solution, we can use Boehm-Demers-Weiser
>> conservative GC (http://www.hpl.hp.com/personal/Hans_Boehm/gc/). I
>> tried to use it with BJam some time ago with good results but forgot
>> to write about it here.
> What are you collecting with the GC?
> List nodes? How much can thatreally save?
In the unpatched BJam strings can't be collected because they are still
referenced from list nodes. That's why I limit the node cache size.
> I think we want to be collecting strings. We could do it by
> allocating the string cache hashtable in untraced memory and
> registering a finalizer for each string that removes its entry from
> the cache.
No, we need to allocate strings as atomic GC objects (change malloc in
strings.c to gc_alloc_atomic). Boehm GC will collect them and won't scan
string contents for pointers.
-- With respect, Alex Besogonov (cyberax_at_[hidden])
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk