[fpc-pascal] more memory for local var in function

Peter Vreman peter at freepascal.org
Tue Sep 6 08:09:48 CEST 2005


> Hi,
>
> I have a program that don't work if I declare a local array of 15000
> bytes, but it works if the array is
> only for 500 bytes,
>
> Where is the problem? frame, heap, stack?

Stackframe. Most of the time it is a buffer overrun or an not initialized
variable.


> how can I increase the memory for local vars in procedure/functions?

There is no way. Most OS's let the stack grow when needed. The stacksize
option (-Cs) only helps when stackchecking is turned on.






More information about the fpc-pascal mailing list