[英]Python recursion on heap memory
Is there any good methods to place recursion stack on heap to prevent stack overflowing? 有什么好的方法可以将递归堆栈放在堆上以防止堆栈溢出?
Of course, there is method to store own stack and place there function's variables (frame) and just simulate recursion, and, by all appearances, I'm looking for something like decorator, which will do it automatically. 当然,有一种方法可以存储自己的堆栈,并在其中放置函数的变量(框架),并且仅模拟递归,而且,从所有方面来看,我正在寻找诸如decorator之类的东西,它将自动完成。
There are a few options here. 这里有一些选择。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.