flat assembler
Message board for the users of flat assembler.
Index
> Windows > Size of the local buffer |
Author |
|
revolution 28 Sep 2016, 13:35
There is no maximum local stack size except until you run out of memory, or you exceed the stack limit.
But be aware of the guard page that Windows uses to monitor stack growth and allocate new pages. You need to either statically allocate the stack by using the "stack maximum,allocated" directive or touch the stack from the top down one page at a time before trying to use it. Otherwise your program will crash with an invalid memory access. So for your case you can use "stack 1048576,1048576" to avoid the access error. |
|||
28 Sep 2016, 13:35 |
|
Tomasz Grysztar 28 Sep 2016, 13:49
In documentation there is an example of stack-probing macro, "sp_prologue", that you can use to automatically create a code that touches the stack in order to grow it when entering procedure.
|
|||
28 Sep 2016, 13:49 |
|
mikado3333 28 Sep 2016, 18:12
Understood, thanks
|
|||
28 Sep 2016, 18:12 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.