当前位置:编程学习 > C#/ASP.NET >>

请问在C#中如何查看堆栈大小?用递归函数是否容易引起堆栈溢出?

请问在C#中如何查看堆栈大小?用递归函数是否容易引起堆栈溢出? --------------------编程问答-------------------- http://msdn.microsoft.com/zh-cn/library/f144e03t.aspx
堆栈大小??? 试你分配而定
--------------------编程问答-------------------- CLR 管理的是托管堆内存! 但是一个线程的栈内存是如何自己设定的? 这个有相关的资料可以查吗?
--------------------编程问答-------------------- 自己看了一下资料:

Recursive versions of many routines may execute a bit more slowly than the iterative 
equivalent because of the added overhead of the additional method calls. Too many recursive 
calls to a method could cause a stack overrun. Because storage for parameters and local 
variables is on the system stack, and each new call creates a new copy of these variables, it 
is possible that the stack could be exhausted. If this occurs, the CLR will throw an exception. 
However, you probably will not have to worry about this unless a recursive routine runs wild. --------------------编程问答-------------------- 谢谢你的资料分享
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,