From: Björn Persson on
Jerry wrote:

> ulimit allows querying the hard limit of stack space
> ulimit -Hs
> which on OS X reports 65532 = 2^16 -4 kilobytes, about 67 MB. The user
> via ulimit can set the stack up to that size but not higher:
> ulimit -s 65532
> The default soft limit on OS X is 8192 kB, found by
> ulimit -s

I read this discussion as it happened, and thought it should be possible for
a program to raise its own soft stack limit up to the hard limit, without a
shell script wrapper. Today I stumbled on it. The POSIX system calls are
getrlimit and setrlimit. It should be possible to import them with the usual
methods for interfacing to C. Try "man 2 setrlimit" on any Unix-like system.
Maybe this helps someone.

--
Bj�rn Persson
PGP key A88682FD