
The reasons for wanting this is when using recursive procedures, eg. sort routines, folder scanning, compression and fractal routines that call themselves - it would be very useful to check the free stack size before the call. At the moment i'm monitoring how much stack space i use myself but this is tedious and makes sharing code difficult, eg. my code has no idea how much stack space is in use when someone else calls it and hence cannot know when the maximum depth is reached.
If this was implemented perhaps the debugger could also check the stack space before doing anything stack related to prevent programs from crashing?
Any comments are appreciated!
