From owner-freebsd-current@FreeBSD.ORG Sat May 26 04:06:04 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4A27116A400 for ; Sat, 26 May 2007 04:06:04 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout5.cac.washington.edu (mxout5.cac.washington.edu [140.142.32.135]) by mx1.freebsd.org (Postfix) with ESMTP id 24EE913C45A for ; Sat, 26 May 2007 04:06:04 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.9] (may be forged)) by mxout5.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l4Q463CH030162 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 25 May 2007 21:06:03 -0700 X-Auth-Received: from [192.168.10.45] (c-67-166-149-71.hsd1.ca.comcast.net [67.166.149.71]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l4Q462t9026252 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 25 May 2007 21:06:03 -0700 Message-ID: <4657B253.7070001@u.washington.edu> Date: Fri, 25 May 2007 21:06:43 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Michiel Boland References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.1.294258, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.5.25.204734 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: freebsd-current@freebsd.org Subject: Re: gcc memory consumption: amd64 v i386 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2007 04:06:04 -0000 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