On emu8086 stack is 256 bytes long. How long will it be if we write our code directly on 64-bit windows (or any other) system?
Asked
Active
Viewed 41 times
0
-
1Whatever the OS is giving you. The address space is likely bigger than all the memory you have (including swap). On linux the default stack limit is 8MiB. Even on emu8086 you should be able to adjust the stack pointer to get access to a 64k stack. – Jester Mar 29 '22 at 11:39
-
3It took about 10 seconds for me to google "64-bit Windows stack size" to find this site (https://learn.microsoft.com/en-us/cpp/build/reference/stack-stack-allocations?view=msvc-170), where it says the default stack size is 1 MiB. – xiver77 Mar 29 '22 at 13:36
-
Default stack size for Visual Studio x64 builds is 1 MB. I don't know what the limit is, but I tested setting stack size to 64 MB without issue. – rcgldr Mar 29 '22 at 16:26