flat assembler
Message board for the users of flat assembler.
Index
> Windows > stack reserve,commit |
Author |
|
revolution 27 Jan 2010, 03:31
hopcode: You can't grow your stack at more than 4k (0x1000) steps. The paging mechanism only sets a guard page at the page immediately below the current page. So if you skip a page then you get an access violation.
Also if you overflow the stack the Windows error handler can't get memory to allocate for itself and will die due to lack of memory, thus your app will simply disappear from the task list with no warning. |
|||
27 Jan 2010, 03:31 |
|
hopcode 27 Jan 2010, 14:08
Yes, it is just as you say (and the manuals stated it).
In fact my question seems pointless because we (Windows users) are used to this wise mechanism. |
|||
27 Jan 2010, 14:08 |
|
baldr 28 Jan 2010, 13:10
revolution wrote: hopcode: You can't grow your stack at more than 4k (0x1000) steps. The paging mechanism only sets a guard page at the page immediately below the current page. So if you skip a page then you get an access violation. hopcode wrote: In fact my question seems pointless because we (Windows users) are used to this wise mechanism. |
|||
28 Jan 2010, 13:10 |
|
hopcode 28 Jan 2010, 15:35
baldr wrote: Yes and no. VirtualAlloc... Right! (i wanted to be not so nitpicking! ) anyway, i use already that functionality in my ide. reserve/commit -> decommit etc, avoiding handling SEH or setting a guard page flag, baldr wrote: ...though it's risky... Cheers, hopcode |
|||
28 Jan 2010, 15:35 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.