ulimit -s <n>
Sets the stack size to n kbytes, or unlimited to allow the stack size to grow without limit.