|
Boost-Build : |
From: Alex Besogonov (cyberax_at_[hidden])
Date: 2006-09-05 03:51:01
Rene Rivera wrote:
>> left bjam with a 1.7Gb memory footprint, leaving very little memory
>> for the build phase on this 2Gb machine.
> Yea, it's a painful effect of the string handling of bjam :-( There
> aren't that many options for fixing it short of a rewrite to C++ which
> someone, wish I could remember his name now, is working on.
That's me :) My C++ port is Almost Ready (tm)
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.
I've attached my patch to lists.c which limits the size of freelist
cache so GC can collect unused strings.
-- With respect, Alex Besogonov (cyberax_at_[hidden])
Index: lists.c
===================================================================
RCS file: /cvsroot/boost/boost/tools/jam/src/lists.c,v
retrieving revision 1.8
diff -r1.8 lists.c
30a31,35
> #ifdef USE_BOEHM_GC
> static int list_size = 0; /* number of free lists in the cache */
> #define MAX_CACHE_SIZE 100
> #endif
>
80a86,88
> #ifdef USE_BOEHM_GC
> list_size--;
> #endif
227c235,239
< if( head )
--- > if( head > #ifdef USE_BOEHM_GC > && list_size<MAX_CACHE_SIZE > #endif > ) 230a243,245 > #ifdef USE_BOEHM_GC > list_size++; > #endif 231a247 >
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