- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is something we've had in mind for a long time, and is already on our "wish list". It's not easy to detect how much stack you have left - you have to touch the memory and see if you get an access violation.
A simpler scheme is to choose to allocate things larger than some threshold on the heap, with the threshold value specifiable by the user (as a compile option.) We actually implemented this on OpenVMS Alpha but the underpinnings to do this aren't there on the Intel side, so we'd have some additional implementation work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Huh... I was about to say that the address of stack limit is constant per process and thus can be evaluated only once in advance, however, then I realized that it's a per-thread value, and a compiler doesn't have a crystal ball to know in what thread context the code will be executed.
I'm not versatile in assembly, but I assume that nothing sensible can be deduced solely by the value of ESP? (Btw, does it grow or decline on x86 with the depth of call stack?)
Indeed, your secondscheme seems easier for realization. I hope we'll see it in foreseeable future.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page