Re: About stack size

From: Alwyn (dt015a1979_at_mac.com.invalid)
Date: 09/10/04


Date: Fri, 10 Sep 2004 10:52:07 +0100

In article <bc2bfdd5.0409100054.73071cf5@posting.google.com>, Niklas
Borson <niklasb@microsoft.com> wrote:

> Alwyn <dt015a1979@mac.com.invalid> wrote in message
> news:<100920040103254378%dt015a1979@mac.com.invalid>...
>
> > It depends on the platform, but most of them are like this:
> > <http://lambda.uta.edu/cse5317/fall02/notes/node30.html>
>
> I doubt "most" of them are like that any more. Consider a process
> with multiple threads, all sharing the same address space. Each
> thread will typically have its own stack.

Yes, each thread of a process will need its own stack. But AFAIK, most
Unix processes are still single-threaded.

> (Actually, under Windows
> there are two stacks for each thread, IIRC, one for user mode and
> one for kernel mode.)

I wasn't aware Windows did that. You learn something every day.

Alwyn



Relevant Pages

  • Re: x86 exception handling and stack demand
    ... All of the state there is maintained in kernel-mode-only store locations and is not stored on the user mode stack. ... This varies based on all installed SEH frames, and that can vary based on OS version, third party programs installed, CRT version, and many other things. ... However, consider that in the case of a STATUS_STACK_OVERFLOW exception, the only stack available is the last committed page that was formerly marked as a guard page. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: KEYEVAL freezing header?
    ... I used this key assignment as a guide for my use. ... When I press key 84.2 while in USER mode the Header still displays the ... It just tests the stack depth and either ... "EQW" command, but I would like it to pull up a blank EQW (as it would ...
    (comp.sys.hp48)
  • Re: Extranets need a stack too
    ... But extranets don’t really have a stack yet. ... would happen if email relationships had a contract: ... should have service software that allows us manage information sharing ... I should be able to allow my business users to create actual ...
    (microsoft.public.sharepoint.portalserver)
  • Re: x86 exception handling and stack demand
    ... When an exception occurs that will be passed down to user mode as an SEH exception, the kernel arranges for control to return to user mode at a special function in NTDLL, with several parameters on the stack containing information about the exception. ... In XP and later, the system stores a pointer to the initial stack allocation block in the TEB that is used by the kernel to decommit the stack via NtFreeVirtualMemory when the thread is terminated in a non-graceful fashion, closing this leak. ...
    (microsoft.public.win32.programmer.kernel)
  • [PATCH REPOST^3] Run IST traps from user mode preemptive on process stack
    ... Run IST traps from user mode preemptive on process stack ... to the process stack when the trap originated from user mode. ... Then the actual trap handlers can run with preemption enabled ...
    (Linux-Kernel)