Increase Stack Size on Windows (GCC)

后端 未结 4 697
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 15:20

Is there a way to increase the stack size of a Windows application at compile/link time with GCC?

4条回答
  •  再見小時候
    2020-11-28 15:50

    IIRC, In GCC you can provide the --stack,[bytes] parameter to ld.

    E.g.

    gcc -Wl,--stack,16777216 -o file.exe file.c
    

    To have a stack of 16MiB, I think that the default size is 8MiB.

提交回复
热议问题