Search code examples
mingwmingw-w64

MinGW stack size reserved or committed?


MSVC has the linker option "/STACK:reserve[,commit]".

Allowing you to specify both how much is reserved and committed.

MinGW has the option "--stack < size >".

It only takes a single parameter.

Is this "size" reserved or committed?

I'm trying to pre-commit the whole stack, so stack probing is not required at runtime; and I can't find any documentation on this switch.


Solution

  • -Xlinker --stack=0x100000,0x100000

    https://sourceware.org/binutils/docs/ld/Options.html#Options