"virtual memory exhausted: Out of memory" with a large static array

John (Eljay) Love-Jensen eljay@adobe.com
Thu Feb 8 21:17:00 GMT 2007


Hi Pavel,

Please provide a short complete code example (that compiles) that reproduces the problem.

If I understand what you are attempting, it appears that you'll need to set your system to support 128 GB of stack.  The default on many systems is in the 4 MB to 16 MB range (my system is 8 MB), although I've worked on some that only supported 256 bytes of stack.  Note:  the stack size on many platforms is not determined by the compiler, it's determined by the OS.

Make sure that you have sufficent memory installed on your system.

HTH,
--Eljay



More information about the Gcc-help mailing list