[Python-Dev] stack check on Unix: any suggestions? (original) (raw)
Jack Jansen jack@oratrix.nl
Thu, 31 Aug 2000 16:20:45 +0200
- Previous message: [Python-Dev] FW: test_largefile cause kernel panic in Mac OS X DP4
- Next message: [Python-Dev] stack check on Unix: any suggestions?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm confused now: how is this counting-stack-limit different from the maximum recursion depth we already have?
The whole point of PyOS_StackCheck is to do an actual check of whether there's space left for the stack so we can hopefully have an orderly cleanup before we hit the hard limit.
If computing it is too difficult because getrlimit isn't available or doesn't do what we want we should probe it, as the windows code does or my example code posted yesterday does. Note that the testing only has to be done every first time the stack goes past a certain boundary: the probing can remember the deepest currently known valid stack location, and everything that is shallower is okay from that point on (making PyOS_StackCheck a subroutine call and a compare in the normal case).
Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm
- Previous message: [Python-Dev] FW: test_largefile cause kernel panic in Mac OS X DP4
- Next message: [Python-Dev] stack check on Unix: any suggestions?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]