From: David Abrahams (dave_at_[hidden])
Date: 2006-11-05 10:53:14
David Abrahams <dave_at_[hidden]> writes:
> Rene Rivera <grafikrobot_at_[hidden]> writes:
>> Rene Rivera wrote:
>>> David Abrahams wrote:
>>>> Vladimir Prus <ghost_at_[hidden]> writes:
>>>>> can you tell what is the current state of bjam-in-C++ rewrite? IIRC, you said
>>>>> that parser/evaluation is done and you're working on build engine.
>>>>> Perphaps if build engine proved hard, we can use the existing build engine?
>>>>> Memory consumptions starts to become a problem with bjam, and I'm hoping that
>>>>> implementation with ref-counted strings would be a big step forward, even if
>>>>> not everyting is converted.
>>>> I wonder if we wouldn't be better off simply integrating the boehm
>>>> collector? We'd only have to prevent it from scanning the global map
>>>> for references to strings and introduce some forced collections as
>>>> memory use grows.
>>> It's already integrated. Just: download it (at least version 6.7), put
>>> it in tools/jam/src/boehm_gc, and build bjam with a "--gc" option.
>>> Unfortunately it crashes at some point, and I have no clue how to
>>> diagnose and fix the seeming problems.
> Have you got a reproducible test case?
I think I may have mentioned this before, but your code to do GC
doesn't look right to me. If you want the finalizer to run, you have
to do something to ensure that the hashtable itself is not scanned, or
those strings will always be considered referenced.
Also, if you're looking for a cause of the crash, I'd check your use
of NO_INTERIOR_POINTERS. Are you 100% sure that every allocated block
of memory is referenced by a pointer to its start?
-- Dave Abrahams Boost Consulting www.boost-consulting.com
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