From owner-freebsd-current@FreeBSD.ORG Fri May 25 20:05:02 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 21E3616A421 for ; Fri, 25 May 2007 20:05:02 +0000 (UTC) (envelope-from Michiel.Boland@internl.net) Received: from neerbosch.nijmegen.internl.net (neerbosch.nijmegen.internl.net [217.149.193.38]) by mx1.freebsd.org (Postfix) with ESMTP id B6A1613C4B0 for ; Fri, 25 May 2007 20:05:01 +0000 (UTC) (envelope-from Michiel.Boland@internl.net) Received: from neerbosch.nijmegen.internl.net by neerbosch.nijmegen.internl.net via neerbosch.nijmegen.internl.net [217.149.193.38] with ESMTP for id l4PJmU8Y003165 (8.13.4/1.4); Fri, 25 May 2007 21:48:30 +0200 (MEST) Received: from localhost by neerbosch.nijmegen.internl.net via mboland@localhost with ESMTP for id l4PJmTfG003160 (8.13.4/2.02); Fri, 25 May 2007 21:48:29 +0200 (MEST) X-Authentication-Warning: neerbosch.nijmegen.internl.net: mboland owned process doing -bs Date: Fri, 25 May 2007 21:48:29 +0200 (MEST) From: Michiel Boland To: freebsd-current@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Fri, 25 May 2007 22:57:11 +0000 Subject: 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: Fri, 25 May 2007 20:05:02 -0000 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