| ▲ | csjh 3 hours ago | |
What do you mean outside of programmer control? What's stopping you from setting the stack size in the linker flags? | ||
| ▲ | HarHarVeryFunny 3 hours ago | parent [-] | |
With Linux the stack size is a process limit, set with ulimit (default 8MB?). You can even set it to unlimited if you want, meaning that essentially (but not quite) the stack and heap grow towards each other only limited by the size of the address space. ulimit only affects the main program stack though. if you are using multi-threading then there is a per-thread stack limit, which you can configure with pthreads, but not until C++23 for std::thread. | ||