java调用栈的最大深度是多少? [英] What is the maximum depth of the java call stack?
本文介绍了java调用栈的最大深度是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在出现 StackOverflowError 之前,我需要进入调用堆栈多深?答案平台是否依赖?
How deep do I need to go into the call stack before I get a StackOverflowError? Is the answer platform dependent?
推荐答案
这取决于分配给堆栈的虚拟内存量.
It depends on the amount of virtual memory allocated to the stack.
http://www.odi.ch/weblog/posting.php?发帖=411
您可以使用 -Xss
VM 参数或 Thread(ThreadGroup, Runnable, String, long)
构造函数.
You can tune this with the -Xss
VM parameter or with the Thread(ThreadGroup, Runnable, String, long)
constructor.
这篇关于java调用栈的最大深度是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文