Is there a way to increase the stack size of a Windows application at compile/link time with GCC?
相关问题
- Inheritance impossible in Windows Runtime Componen
- how to get running process information in java?
- Is TWebBrowser dependant on IE version?
- How can I have a python script safely exit itself?
- I want to trace logs using a Macro multi parameter
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- Bundling the Windows Mono runtime with an applicat
- Windows 8.1 How to fix this obsolete code?
- Threading in C# , value types and reference types
- gcc/g++ gives me error “CreateProcess: No such fil
- Calls that precede a function's definition can
There are two stack sizes in Windows. The initially commited size, and the total reserved size. You can set both with a STACKSIZE statement in a .def file.
When creating threads you use the dwStackSize paremater, but I'm not sure how to change the size for the main thread, this indicates its in the exe's header, so it may be an option for the compiler/linker, else you need to find the relevant part of the header and change it yourself.
http://msdn.microsoft.com/en-us/library/ms686774(VS.85).aspx
You could run editbin after linking.
IIRC, In GCC you can provide the --stack,[bytes] parameter to ld.
E.g.
To have a stack of 16MiB, I think that the default size is 8MiB.