Kevan Hashemi wrote:
I'm trying to force the operating system to give my Pascal code a 2-MByte stack so I can solve a problem with a recursive routine. I have tried:
const {for recursive routines} minstacksize: cardinal = 2000000; attribute (name = '_stklen');
But that does not appear to work. Perhaps I am not trying hard enough. Am I on the right track?
Seting stack limit is mostly operating system matter and has little to do with Gpc. On linux the ulimit command allows changing stack limit:
limit -s 2048
sets limit to 2MB (unit is kilobyte). Note that in most Linux distributions default limit seem to be higher, like 8MB. Other systems have their own means.