os_query_stackBottom() how does it work?
Chad J
"gamerChad\" at spamIsBad gmail.com
Mon May 8 16:21:12 PDT 2006
mclysenk at mtu.edu wrote:
>
> I think there's some confusion with the notation that the GC uses. Internally
> the stack bottom is the higher address while the stack top is the lower address
> or the stack pointer. This is a bit confusing at first, but it makes sense
> given that the stack grows downwards. In order for the GC to mark the entire
> stack used by the program, it needs the stack pointer for the start of the range
> and the stack bottom for the end.
>
> -Mik
>
>
Interesting. Maybe when that thread/stack is started then the GC could
store that address somewhere. Then when it needs the stack "bottom", it
could just grab that value. Problem there I see is if the stack gets
moved, but I think there is a WinCE function that handles that, allowing
you to set a callback that will be used if the stack is moved or
something. If such a thing would work it's probably more efficient than
the "guess" method that I expect it to use as is. Either that or I'm
too much of a newb and don't really understand this stuff. Anyhow those
are my thoughts.
More information about the D.gnu
mailing list