09-11-07 06:18 PM
On 9 Sep, 00:07, Frank Cusack <fcus...@fcusack.com> wrote:
> On Sat, 08 Sep 2007 15:52:20 -0000 Bahadir <Bilgehan.Bal...@gmail.com> wro
te:
>
>
>
> text/data/bss <----> ... <---> stack <----> stack <----> stack
>
>
> huh?
>
>
> Each new thread gets a stack mapped in bascially at some offset from
> the top of the previous stack, determined by the stack size of the
> previous thread. But you wouldn't simply keep going down in memory,
> you'd want to fill in the holes where threads no longer exist.
>
> I guess it would be a good idea to maintain a guard page in between
> stacks. That is, when the stack hits a guard page don't automatically
> map the next page in, check if there is only that one page left before
> the next stack. That way you won't have stacks overrunning each
> other.
>
> -frank
Hi,
Thanks this reply makes sense. It's how I anticipated it.
Bahadir
[ Post a follow-up to this message ]
|