哪种语言/平台没有固定的堆栈大小?
是否某些语言或平台没有固定大小的堆栈,因此不容易溢出? 我记得在UNIX上使用C时,堆栈很难溢出,而在Win 3.1时代,堆栈很容易溢出。
does some language or platform not have a fixed size of stack and therefore not easy to overflow? I remember using C on UNIX, the stack was difficult to overflow while back in the days of Win 3.1, the stack was very easy to overflow.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果“堆栈”指的是任何旧堆栈,那么大多数语言都会这样做 - Java 有一个 stack 类仅受内存限制。 更有可能你指的是调用堆栈,在这种情况下,我能想到的最大的例子是 Stackless Python,它据我了解,使用纯Python内存限制堆栈(如Java的)作为Python代码的调用堆栈,而不是使用C的调用堆栈。
If by "stack" you mean any old stack, most languages do-- Java has a stack class limited only by memory. More likely you mean the call stack, in which case the biggest example I can think of is Stackless Python, which, to my understanding, uses a pure-python memory-limited stack (like Java's) as the call stack for Python code, rather than using C's call stack.
这是一个实践与理论的问题。 Lisp 解释器的堆栈仅受方案和实现尾递归的其他语言中的可用内存限制
,尾递归函数将具有无限堆栈
this is a question of the practical vs the theoretical. the stack of a lisp interpreter is limited only by available memory
in scheme and other languages that implement tail recursion, a tail recursive function would have an infinite stack
Mac 系统 6、7 和 8 的调用堆栈可以在没有人为限制的情况下增长。
它也没有可靠的方法来检测堆栈-堆冲突,并且可能会给您带来各种麻烦......
Mac Systems 6, 7, and 8 had call stacks that could grow without artificial limit.
It also has no guaranteed way to detect a stack--heap collision, and could get you into all kinds of trouble that way...