[gccsdk] Running out of memory when compiling C++ program

Alan Buckley alan_baa at hotmail.com
Fri Mar 4 00:39:12 PST 2011

I’m trying to compile some examples using the boost
library natively using the GCC4.1.1 release 2 compiler
and keep running out of memory.

I understand that C++ does require a lot of memory
so there may be nothing that can be done about it.

However I get:

cc1plus: out of memory allocating 65536 bytes after a total
of 33492992 bytes.

What I don’t understand is why that only seems to be 33MB
and according to the Tasks list I still have 54MB of free space
at this time. I start with 111MB.

I get the same result on RISC OS 4.0.2 on RPCEmu and on an
Iyonix (RISC OS 5.12 or later I think).

Is this a problem with g++ memory handling or has it really
run out of memory and just the task display is not up to date
and the message is misleading?

I couldn’t see anything, but is there a way to force g++ to
use only a certain amount of RAM? or a virtual memory
system that is compatible with it and will work on my
Iyonix at least?

Is this something that the GCC4.6 compiler will be better
with when its released?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riscos.info/pipermail/gcc/attachments/20110304/6add7c18/attachment.html>

More information about the gcc mailing list