Boost logo

Proto :

Subject: Re: [proto] Compiling in debug mode
From: Daniel Oberhoff (daniel.oberhoff_at_[hidden])
Date: 2011-05-31 13:22:39

Am 31.05.2011 um 14:20 schrieb John Bytheway:

> On 13/05/11 03:59, Eric Niebler wrote:
>> On 5/13/2011 5:45 AM, Bart Janssens wrote:
> <snip>
>>> I've gotten to the point where a compile can use upwards of 1.5GB for
>>> a single test, resulting in much swapping, especially when compiling
>>> with make -j2 (which I try to remember not to do, now ;).
>> Ouch. Do you have to use gcc? Perhaps clang might give you better results.
> My experience suggests that clang saves time, but uses more memory than
> gcc, (I think it's because it's more careful about preserving source
> location information).

Don't know if I mentioned that here before, but you can make gcc trade time for memory by controlling its garbage collector. These arguments work for me:

--param ggc-min-expand=30 --param ggc-min-heapsize=8192

for more info look here:

I remember there was also something about older gcc versions (that may even include 4.4) being bad with templates, where clang was much better, but I think this was runtime. Cant find the reference right now.

Hope that helps


Proto list run by eric at