Array size problem

Eljay Love-Jensen eljay@adobe.com
Mon Jul 19 12:31:00 GMT 2004


Hi Joachim,

If you are declaring the array on the stack, you've probably exhausted your 
stack.  The work around is to get/release the storage of your array using 
C++) new and delete, C) malloc and free.  Since you have a two-dimensional 
array, you'll have to account for that yourself, via allocarray[a * 100 + 
b] access.

If you are declaring the array in the .bss or .data section, you've 
probably exhausted available memory (including virtual memory), or have 
exceeded the limits of the architecture.  The work around is to store the 
array in a file, and access it through either a smaller chunk of the array 
-- which you "swap" in and out through your array window (slow) or which 
you manipulate pretty much directly (slower, but easier to implement).

HTH,
--Eljay



More information about the Gcc-help mailing list