|
From: Mark W. <ma...@np...> - 2001-09-25 20:21:09
|
Hi, Here's my understanding of stacks in NT/ReactOS: (1) Reserve a lump of memory for the stack (2) Commit 2 pages; one stack page and one guard page (3) Change the protection on the guard page so that it is a guard page When the guard page is touched, NT commits a new page to act as the guard page. As far as the fault handler seems to be concerned it wants to know: StackBase StackLimit *AND* DeallocationStack the DeallocationStack is used for freeing the stack/checking whether you can actually commit more pages. If the stack would grow beyond its reserve size then we raise a stack fault, and let the app handle it or barf. Of these items, we have the first two stored in the NT_TIB structure and the final one stored in the _TEB structure (which seems odd - any ideas why?). My question is - where is the fault handler in ReactOS that commits the extra page? Sorry to ask, but I've had a dig around for likely looking code (references to TEB, StackBase, DeallocationStack) and I can't seem to find it! Plus, am I correct in that the above information is all that the stack fault handling code is interested in? Thanks, Mark ==================================================== = To remove yourself from this mailing list, go to = = http://www.reactos.com/home/mailing.html = ==================================================== |