Re: gcc memory consumption: amd64 v i386

From: Garrett Cooper <youshi10_at_u.washington.edu>
Date: Fri, 25 May 2007 21:06:43 -0700
Michiel Boland wrote:
> Hi. I noticed that compilation of xorg-server on i386 with the new gcc 
> proceeds normally, whereas compilation on amd64 would crash because the 
> compiler would consume all memory. The i386 and amd64 boxen have the 
> same amount of RAM and swap, obviously. And they run, give or take a few 
> hours, more or less same version of -CURRENT.
> 
> So it appears that memory consumption of gcc on amd64 is significantly 
> greater than on i386. To test this further I created a very simple C 
> source file:-
> 
> void n0() { }
> void n1() { }
> void n2() { }
> void n3() { }
> ...
> void n49998() { }
> void n49999() { }
> 
> (i.e. a file with 50000 trivial function definitions.)
> 
> I compiled this file with several optimization levels, and then got the 
> following
> 
>              no optimization    -O
>   amd64        164M            445M
>   i386         142M            247M
> 
> I was wondering if anyone can make any sense out of this.
> 
> Cheers
> Michiel

What are your CFLAGS and CXXFLAGS? What -O did you build with?
-Garrett
Received on Sat May 26 2007 - 02:06:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:11 UTC