simple question set stack on linker

Started by nickhere, December 08, 2014, 07:19:19 PM

Previous topic - Next topic

nickhere

I am programing in hla assembly
I need to increase the stack

what is the proper  format for the linker
/stack????

jj2007

/stack:reserve, commit

/stack:1024 reserves 1024 bytes
/stack:1024, 1024 reserves and commits 1024 bytes

Have a look at SetProcessWorkingSetSize, though, and google SetProcessWorkingSetSize linker /stack option

nickhere

POLINK: warning: Unrecognized option '/STACK:1024,1024'; ignored.
doesnt work

jj2007

Strange. No warning here, although the option apparently has no effect. SetWorkingSize looks more promising.
Sometimes I use EmptyWorkingSet(GetCurrentProcess)   , and working set drops from 1.7MB to 600kB
See also STACKSIZE option in def files.

TimoVJL

For me it sets IMAGE_OPTIONAL_HEADER SizeOfStackReserve and SizeOfStackCommit values.
May the source be with you

frankie

Quote from: nickhere on December 09, 2014, 12:22:38 AM
POLINK: warning: Unrecognized option '/STACK:1024,1024'; ignored.
doesnt work

The command works and, as Timo said insert that values in the PE file.
Please post the compiler version you are using and the full command line as you type it.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

jj2007

Can you see an effect on memory usage seen through task manager?