gcc 3.3 garbage collector defaults

Andi Kleen ak@suse.de
Mon Jan 27 19:43:00 GMT 2003


On Mon, Jan 27, 2003 at 02:08:45PM -0500, Phil Edwards wrote:
> On Mon, Jan 27, 2003 at 02:04:37PM -0500, David Edelsohn wrote:
> > >>>>> Benjamin Kosnik writes:
> > 
> > Ben> Aaaaaaaaaaghh!!!!!! Why aren't these flags documented!!!! Why aren't
> > Ben> the defaults sane???
> > 
> > 	The defaults are very sane for a 128MB 200MHz system :-).
> 
> Which just goes to show two things:
> 
> 1)  SOMEbody *cough*david*cough* needs to drop some cash on new hardware, and
> 2)  the defaults should adjust themselves to the host's memory.

One has to be careful. e.g. many people run make with -j2 on principle on
single CPU systems to hide IO latencies [anybody interested in POSIX aio prefetch
for gcc btw ?;]  Also when I have a multi CPU box I need enough memory
for -j$[2*nrcpus]  (or [4*nrcpus] with hyperthreading) and still not swap
out my window manager and editor. All these cases should not suddenly start to swap.

Rough proposal: 

Main memory < 512MB: 16MB 
            < 1GB:   64MB
			> 1GB:   128MB

Also it would be nice to make it settable via an environment variable. 

Portable memory size detect functions can be nicked from GNU sort in coreutils btw.

-Andi



More information about the Libstdc++ mailing list