What is the relationship between ulimit -s > and the stack size (at thread level) in the Linux implementation (or for that matter any OS)?
> and the stack size (at thread level) in the Linux implementation (or for that matter any OS)?
In a threaded program, stacks for all threads (except the initial one) are allocated out of the heap, so RLIMIT_STACK has little or no relation to how much stack space you can use for your threads.
RLIMIT_STACK