> > If we could calculate how much stack is left we'd have a much more > robust way of doing recursion limits. I suppose this could be done by > reading a byte from each page with a temporary SIGSEGV handler > installed, but I'm not convinced you can't ask the platform directly > somehow. I'd also be considered about thread-safety. >
It's something as hard as taking address of local variable at the beginning of the program and at any arbitrary point. Of course 'how much is left' means additional arithmetics. Cheers, fijal _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com