开发者

Is the call stack limit of a program consistent at all across computers?

My knowledge of how the call stack works is limited, but I was basically wondering- if I h开发者_如何学运维ave 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜