This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Running out of swap space



(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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]