Gentoo Archives: gentoo-user

From: Paul Hartman <paul.hartman+gentoo@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Out of memory during GCC compile
Date: Mon, 06 Feb 2012 21:49:11
Message-Id: CAEH5T2PfvWF5bEnZ0NjX486SBM1rdnT6mDBRtAzV-3FzbHW5HQ@mail.gmail.com
In Reply to: [gentoo-user] Out of memory during GCC compile by Grant
1 On Mon, Feb 6, 2012 at 3:33 PM, Grant <emailgrant@×××××.com> wrote:
2 > I'm trying to compile GCC on a remote system with 192MB RAM.  It's
3 > completed successfully before but now it uses up all RAM.  The compile
4 > doesn't stop but it must be thrashing.  I have MAKEOPTS="-j1" in
5 > /etc/make.conf.  Am I jeopardizing my HD by letting it swap on the
6 > compile right now?  I've ordered an upgrade to the max of 512MB.  I've
7 > stopped all processes using up memory that I don't need including X.
8 > Is there anything else I can do to get through the compile with 192MB
9 > RAM?
10
11 Use -O0. Don't enable debugging. I think GCC has some switches to
12 control memory usage/heap limits. You might want to try those and set
13 them to something low like 16MB, it probably uses as much as it can by
14 default.