My knowledge of how the call stack works is limited, but I was basically wondering- if I have a program that results in a stack overflow after X amount of recursions on my own computer (e.g. a while back I made a small program that did so at about 400 recursions on my computer), will this be roughly the same on other computers at all, or is it likely to vary more?
This isn’t in relation to anything in particular, I was just curious. Thanks.
It can vary, not only between computers but also between processes and even threads when within a process. When starting a worker thread, there is an option to specify the thread’s stack size on many operating systems.
On OSes there are different default stack sizes.