Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 May 2007 21:06:43 -0700
From:      Garrett Cooper <youshi10@u.washington.edu>
To:        Michiel Boland <Michiel.Boland@internl.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: gcc memory consumption: amd64 v i386
Message-ID:  <4657B253.7070001@u.washington.edu>
In-Reply-To: <Pine.GSO.4.64.0705252135230.2140@neerbosch.nijmegen.internl.net>
References:  <Pine.GSO.4.64.0705252135230.2140@neerbosch.nijmegen.internl.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4657B253.7070001>