tags:

views:

88

answers:

1

I'm trying to compile a particular .cpp file in a large project, and I'm getting the following error from GCC:

virtual memory exhausted: Permission denied

The file in question is ~25k in size, and less than 600 lines of C++ code.

I understand what it means to run out of virtual memory, but I'm not sure what the "Permission denied" qualifier means - my build machine doesn't appear to be running out of memory during the build, and ulimit shows unlimited virtual memory.

Any ideas for correcting this, either through system config, or suggestions for tracking down the offending code?

Note that adjusting GCC build flags is not an option.

A: 

I've since corrected the issue by splitting some of the included .hpp files into multiple parts, and only #including the parts I need in this file. It makes sense to me why that fixes the virtual memory exhaustion, still not sure where permissions were failing though...

210