[Python-Dev] stack check on Unix: any suggestions? (original) (raw)

Thomas Wouters thomas@xs4all.net
Wed, 30 Aug 2000 14:25:42 +0200


On Wed, Aug 30, 2000 at 01:30:01PM +0200, Jack Jansen wrote:

My SGI has getrlimit(RLIMITSTACK) which should do the trick. But maybe this is an sgi-ism? Otherwise RLIMITVMEM and subtracting brk() may do the trick.

No, getrlimit(RLIMIT_STACK, &rlim) is the way to go. 'getrlimit' isn't available everywhere, but the RLIMIT_STACK constant is universal, as far as I know. And we can use autoconf to figure out if it's available.

-- Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!