I am trying to compile an application but I seem to be running into a preset memory constraint. When compiling, it gives me the following error: "virtual memory exhausted: Nicht genügend Hauptspeicher verfügbar", so I read this as having not enough RAM+Swap available.
As I am compiling this on a machine with 32GB RAM, this is quite unlikely. I checked the memory consumption and it breaks down at 3GB. Compiling the application on a different machine works, it needs around 3.5GB. I'm running on fedora 19, 64bit.
I also checked the available user memory using ulimit -a, but everything is set to unlimited (max memory size, virtual memory).
Are there any other places where there might be a limit set to the maximum memory available to a process or user? I'm starting to run out of options.
If the compiler is running out of memory, it might be due to a compiler bug, or some messed up template expansion (remember that in C++ templates are Turing complete, I remember some
dementedcreative soul did something like computing $\pi$ to a lot of digits at compile time). Check your templates.In case of possible compiler bug, upgrade everything. Try using
clang++
instead ofg++
. Play with optimization and other settings.Where does the code come from? Has somebody else built it?