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

John Tytgat John.Tytgat at aaug.net
Fri Mar 4 12:58:43 PST 2011


In message <SNT136-ds16534D828D66BB5BDFFD33F0C20 at phx.gbl>
          "Alan Buckley" <alan_baa at hotmail.com> wrote:

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

When using DA as heap, UnixLib by default clamps this at 32 MByte.

So try:
  * Set cc1plus$HeapMax 96

I expect this to make a difference.

Or if you're on RISC OS 5, make sure (at least) the cc1plus$Heap is
not set (see !GCC.!Run file):

  * UnSet cc1plus$Heap

In that case you will be using the normal WimpSlot.

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

I have no information on its memory usage (compared to GCC 4.1) but
usually newer versions require more memory...

John.
-- 
John Tytgat, in his comfy chair at home                                 BASS
John.Tytgat at aaug.net                             ARM powered, RISC OS driven




More information about the gcc mailing list