On Fri, 11 Aug 2000, Guido van Rossum wrote: > It would be good if there was a way to sense the remaining available > stack, even if it wasn't portable. Any Linux experts out there? I'm far from an expert, but I might have an idea. The question is: must this works for embedded version of Python, or can I fool around with main()? Here's the approach: - In main(), get the address of some local variable. Call this min - Call getrlimit, and see the stack size. Call max = min+ (<stack size ) - When checking for "too much recursion", take the address of a local variable and compare it against max. If it's higher, stop. -- Moshe Zadka <moshez@math.huji.ac.il> There is no IGLU cabal. http://advogato.org/person/moshez
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4