StackOverflowException [英] StackOverflowException

查看:164
本文介绍了StackOverflowException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

随着StackOverflowException的条件抛出硬codeD或依赖于code正在运行的机器上?

With the StackOverflowException are the conditions to be thrown hardcoded or dependent on the machine the code is running on?

我几乎可以肯定,后者却未能在我的搜索,不问不够的问题在这里。

I am almost certain the latter but have failed in my searches and don't ask enough questions here.

推荐答案

的文件

...时执行堆栈溢出,因为它包含了太多的嵌套的方法调用抛出。

... is thrown when the execution stack overflows because it contains too many nested method calls.

由于堆栈的大小依赖于架构的,甚至可以在计算机上覆盖,是的,这个值是不是硬codeD,虽然普遍pretty的静态在Windows上。如果我没有记错,这是1MB大小的默认。

Since the size of the stack is architecture-dependent and can even be overridden on a machine, yes, this value is not hard-coded, though it is generally pretty static on Windows. If I remember correctly, it is 1MB in size by default.

这篇关于StackOverflowException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆