> Note that each time you create a stack from (or otherwise dynamically
> extend the stack), you need to compare the SP to a thread-specific
> limit, which means using TLS. I'm not sure how long Linux (for example)
> has supported TLS, and I'm pretty sure that its support has changed over
> time, so checking SP is not necessarily trivial.
>
> I agree that SP checking would be useful, at least as an option.

There is a hook in Tcl already for this - TclpCheckStackSpace.  It
is implemented for Mac and Windows, but not Unix.  The problem is
creating a unix-cross-platform function that does this without a
major performance cost.  Unfortunately it's somewhat compiler
dependent as well.  I believe there are some test implementations
out there, but none has reached "core quality".

Jeff

Reply via email to