Mail Archives: djgpp/1998/06/05/14:16:04
Walter Gray wrote:
> I get a General Protection Fault if the array size is over about
> 65500 (NB, I do not mean 2^16, I mean about 65500).
>
> Have I hit some sort of limit on array index values?
I am sure it isn't a limit on array index values. How is the array
allocated? Global, static, local or malloc?
I would guess it is local and that you are seeing a stack problem.
Possibly your program is built with too small a stack limit to
handle the nearly quarter-meg array.
I have seen some things that seem to indicate there may be a limit
on the increment by which the stack can grow, even when it doesn't
overflow its full limit. (Does anyone more knowledgable want to
comment on that one?) A quarter Mb is an unusually large
increment to grow a stack.
--
http://www.erols.com/johnfine/
http://www.geocities.com/SiliconValley/Peaks/8600/
- Raw text -