Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2006-04-13 18:21:21

Markus Schöpflin <markus.schoepflin_at_[hidden]> writes:

> Vladimir Prus wrote:
>> On Friday 07 April 2006 09:58, Stefan Slapeta wrote:
>>> during my test runs for intel 9 and cw, bjam comsumes something between
>>> 400 and 500 mb of virtual memory (win32 system). I really can't imagine
>>> what this memory could be used for, but are there any ways to reduce
>>> this hunger?
>> This would require help from you. Go to the "status" directory and run:
>> bjam -n -a --v2 intel-win-9.0 cw-9.0 -d+10 > profile
>> Then, send me the 'profile' file and I'll see if there's something
>> particularly wrong there.
> Do you know if bjam has been valgrinded to check for memory leaks? I tried
> it on some simple projects and valgrind showed a number of leaks, but I
> could not immediately spot how the leaks are created...

Leaks are created all over, because everything in bjam is a list of
strings, and all strings are "interned"; that is, they're stored in a
big hash table and each time a new string is formed it's looked up and
replaced with the instance in the table, if any. There's no reference
counting or anything to finally release the storage, despite the
existence of a freestr() function. It doesn't do anything and that
would defeat interning somewhat and it isn't called reliably anyway.

I hope we can move more of the code to Python soon.

Dave Abrahams
Boost Consulting

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