This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Running out of swap space
- To: help-gcc at gnu dot org
- Subject: Running out of swap space
- From: clc5q at cobra dot cs dot Virginia dot EDU (Clark L. Coleman)
- Date: 3 Nov 1999 15:15:31 GMT
- Newsgroups: gnu.gcc.help
- Organization: University of Virginia Computer Science Department
- Xref: wodc7nx0 gnu.gcc.help:1660
(Where is the FAQ for this group? I found none in comp.answers. Hope
this question is not an FAQ.)
I have a test program that includes a module that will probably
produce about 4.5MB of object code on a typical RISC machine, all in a
single function. (There are reasons that it needs to be a single
function.) Compiling with gcc -c, no optimization, produces an error
that indicates the cc1 process ran out of swap space. On my MIPS
R10000 SGI Octane, it makes it to the asm process before getting the
same error. This is with gcc 2.8.1.
The "ulimit" command indicates 1 or 2 GB of virtual memory available
on each machine. On a DEC Alpha 21164 CPU workstation with gcc 2.95.1,
ulimit simply replies "unlimited".
I see this problem with two different functions, each about the same
size, with one being a very long straight-line code (single basic
block) and another being a giant switch statement with 64 cases, each
having 64KB of object code in it. These are part of a memory-stressing
test program that are deliberately designed to be this big, so I
cannot take any advice along the lines of "reduce the size" or "break
up the functions".
Is there any way to address such a problem through gcc itself
(command-line switches, etc.)?
Thanks for any info.