Re: [Python-Dev] stack check on Unix: any suggestions?
Aug. 30, 2000
6:37 p.m.
My SGI has getrlimit(RLIMIT_STACK) which should do the trick
It tells you how much stack you've got; it does not tell you how much of that is actually in use.
Unix code will also have to differentiate between running on the main stack and a sub-thread stack, probably.
My patch computes (or, rather, estimates) a start-of-stack for each thread, and then saves that in the thread context.
And I haven't looked at the way PyOS_CheckStack is implemented on Windows
It should work for multiple threads just fine. It tries to allocate 8k on the current stack, and then catches the error if any. Regards, Martin
9324
Age (days ago)
9324
Last active (days ago)
0 comments
1 participants
participants (1)
-
Martin v. Loewis