Re: Thread Stacks
- From: Dave Hansen <iddw@xxxxxxxxxxx>
- Date: Tue, 29 Nov 2005 11:06:31 -0600
On Tue, 29 Nov 2005 10:40:24 -0500 in comp.arch, "Eric P."
<eric_pattison@xxxxxxxxxxxxxxxxxx> wrote:
[...]
>I conclude therefore that the correct solution is to specify the
>reserved linear stack size for each individual thread at create
>and that means it is as an argument to the ThreadCreate function.
>Note that this is NOT how Win32 works. As an optimization one could
What, then, is the purpose of the dwStackSize parameter to the Win32
function CreateThread?
>maintain a pool of previously used stack ranges to save continuously
>reserving and releasing the same sized memory sections.
>
>As the stack grows down, each thread should track its low water mark,
>and bounds check and commit new space efficiently, as a single system
>request, only when below the mark. This is also not how Win32 works.
Windoze commits only a page at a time (by default) to a thread's stack
as each page boundary is exceeded. How is this different from what
you describe?
I'm not saying you are wrong. I'm trying to understand how your
solution differs from Win32.
Regards,
-=Dave
--
Change is inevitable, progress is not.
.
- Follow-Ups:
- Re: Thread Stacks
- From: Eric P.
- Re: Thread Stacks
- References:
- Thread Stacks
- From: Andy Glew
- Re: Thread Stacks
- From: Eric P.
- Thread Stacks
- Prev by Date: Re: Need help
- Next by Date: Re: Thread Stacks
- Previous by thread: Re: Thread Stacks
- Next by thread: Re: Thread Stacks
- Index(es):
Relevant Pages
|
Loading