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
demented
creative 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 of g++
. Play with optimization and other settings.
Where does the code come from? Has somebody else built it?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.