GCC out of memory
Terje Slettebø (285) 275 posts |
When using GCC to compile a C++ program on ARMX6 (I get the same result on VirtualAcorn), I get an error message about running out of memory past the 28 MB allocated for the task window, which appears to be the maximum “Next” slot you can set up in RISC OS. The program is quite small. Anyone knows a way around this? |
David Pitt (3386) 1248 posts |
By default Aemulor 2.53 limits Slot sizes to 28MB but 52MB can be selected in Aemulor’s configuration. Without Aemulor RISC OS 5 has a maximum of 512MB. ROL’s OS’s are limited to 28MB. |
Colin Ferris (399) 1814 posts |
Slot size of 52MB with Aemulor – when did that appear? I did think that it could be handy to be able to use Aemulor with VRPC – when running RO5. |
Doug Webb (190) 1180 posts |
Version 2.50 about the same time as ARMBook support and the Pi4 was first supported by the latest version 2.53. |
Terje Slettebø (285) 275 posts |
@David Thanks for the information. Unfortunately, I still run into problems with out of memory, but this time at 31 MB. I’ve tried quitting Aemulor and increasing the wimp slot to 512 MB, and checked that the task window gets this much. I’ve also tried using Aemulor and the 52 MB option. No matter what I do, GCC reports the following: cc1plus: out of memory allocating 65536 bytes after a total of 33521664 bytes. Any idea what this new 31 MB limit could be? |
David Pitt (3386) 1248 posts |
A search of the forum found one similar issue. It might be worth asking on the gcc mailing list. |
Julie Stamp (8365) 474 posts |
Maybe it’s an mmap problem? Keep an eye on the dynamic areas in the task manager as it’s running. |
Jeffrey Lee (213) 6048 posts |
GCC will default to using dynamic areas for its heap, but it looks like the default maximum size is 32MB. I guess that limit is fine for most C programs, but could cause problems for complex C++. Try: *SetEval cc1plus$HeapMax 128 (see the UnixLib readme, which should also be at !GCC.docs.libunixlib.README. There are also some default settings in !GCC.!Run) |
Andrew McCarthy (3688) 605 posts |
Quitting Aemulor hasn’t helped me in the past, restart the computer. Don’t run Aemulor on startup or just before using the compiler. Aemulor locks the wimpslot, I assume, for backwards compatibility.
Sounds good :) |
Jeffrey Lee (213) 6048 posts |
If you need to increase the limit beyond 128MB, you might need to mess around with the max size limit that the OS enforces (OS_DynamicArea 8 – the default is 128MB) |
Terje Slettebø (285) 275 posts |
@Jeffrey
That worked perfectly, thanks a lot! You guys are golden. :) |