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

Michael Eager eager@eagercon.com
Thu Feb 8 18:26:00 GMT 2007


Pavel Saviankou wrote:
> Hi, Michael,
> 
> 
>> Huh?  Structures do not have CRC checks.  If you have data consistency
>> problems, that's nothing that a compiler will help you with.
>>
>> Compilers compile.  They don't manage large data sets.
> you don't understand.
> the structure of a c++-program, of a c++-source code will be incorrect and 
> compilation will broke up with "syntax error", if some errors (during 
> transfer, of by copying) happen.

First, I do understand.

Second, if you send a post to gcc-help, and receive a reply,
continue to include gcc-help in your responses.

Third, if your problem is with creating very large static
arrays which exceed your memory space, please don't muddy the issue
with your concerns about copying data.  If the problem is copying
data without error, then please don't ask gcc-help to address those.

Expecting a compiler to catch your errors in copying data verges
on foolhardy.  There's no syntactic difference between
   int ar[] = { 1, 2, 3 };
and
   int ar[] = { 10, 20, 30, 40 };

I presume that these would not give the same results in your
program.


-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077



More information about the Gcc-help mailing list