Relation between stack limit and threads

后端 未结 2 1833
温柔的废话
温柔的废话 2021-01-12 09:39
  1. What is the relationship between ulimit -s > and the stack size (at thread level) in the Linux implementation (or for that matter any OS)?

2条回答
  •  佛祖请我去吃肉
    2021-01-12 09:57

    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.

提交回复
热议问题