orwe
orwe

Reputation: 233

Stack size in multiple vs projects

Lets say I have a C++ Visual Studio solution with 5 projects A, B, C, D and E. The projects have set the /STACK linker option to:

All of them are built as separate DLLs with exposed functions. Project:

What will be the stack size if I would call function A.foo_a ? Will it be the same if I would call directly E.foo_e ?

Upvotes: 1

Views: 60

Answers (1)

deviantfan
deviantfan

Reputation: 11434

Manually started threads (with CreateThread) can get a custom size from the arguments of the function call, the main thread´s stack size is set accoring to informations from the EXE.

Your five DLLs don´t matter at all.
They can have a custom size set by the linker in their file header,
but the OS won´t do anything with it.

(The runtime stack size (on Windows) is per thread, not per file.)

Upvotes: 1

Related Questions