Re: Minimum Stack Size
Adriaan van Os <[email protected]>
| Newsgroups | gmane.comp.compilers.gpc |
|---|---|
| Message-ID | <[email protected]> |
Waldek Hebisch wrote:
> 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:
On Mac OS X, also a UNIX flavor, the stack limit can be set compile-time with the -stack_size
linker option, see
<https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/ld.1.html>.
Therefore it can be set through gpc with -Wl,-stack_size,hhh where hhh is the stacksize in hexadecimal.
Regards,
Adriaan van Os
_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc