From owner-freebsd-current@FreeBSD.ORG Sat May 26 20:00:23 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 6F5DF16A400 for ; Sat, 26 May 2007 20:00:23 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 5DAB113C480 for ; Sat, 26 May 2007 20:00:23 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 263551A3C1C; Sat, 26 May 2007 13:01:28 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 7F1C852F14; Sat, 26 May 2007 16:00:22 -0400 (EDT) Date: Sat, 26 May 2007 16:00:22 -0400 From: Kris Kennaway To: Michiel Boland Message-ID: <20070526200021.GA53296@xor.obsecurity.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Cc: freebsd-current@freebsd.org, Claus Guttesen 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 20:00:23 -0000 On Sat, May 26, 2007 at 04:19:38PM +0200, 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. > > > >It does not crash if you have enough swap. I have 2 GB swap and it > >proceeded fine after some swapping. > > The point I was trying to make (although perhaps not clearly enough) is > that there is no reason that a trivial source file takes up such a huge > amount of memory to compile. Especially since gcc 3.4.6 does not blow up > like that. Of course there is a reason. You mean "there is no reason I currently understand". Every new version of gcc brings new optimizations. Typically these may require additional memory at compile time to produce a space or time saving at runtime. That's the trade-off. Kris