Boost logo

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 ( 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
> #ifdef USE_BOEHM_GC
> static int list_size = 0; /* number of free lists in the cache */
> #define MAX_CACHE_SIZE 100
> #endif
> #ifdef USE_BOEHM_GC
> list_size--;
> #endif
< if( head )

> 	if( head 
> #ifdef USE_BOEHM_GC
> 		&& list_size<MAX_CACHE_SIZE 
> #endif		
> 		)
> #ifdef USE_BOEHM_GC
> 	    list_size++;
> #endif

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at