NO

Author Topic: simple question set stack on linker  (Read 4378 times)

nickhere

  • Guest
simple question set stack on linker
« on: December 08, 2014, 07:19:19 PM »
I am programing in hla assembly
I need to increase the stack

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

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: simple question set stack on linker
« Reply #1 on: December 09, 2014, 12:02:59 AM »
/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

  • Guest
Re: simple question set stack on linker
« Reply #2 on: December 09, 2014, 12:22:38 AM »
POLINK: warning: Unrecognized option '/STACK:1024,1024'; ignored.
doesnt work

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: simple question set stack on linker
« Reply #3 on: December 09, 2014, 12:38:56 AM »
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.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: simple question set stack on linker
« Reply #4 on: December 09, 2014, 06:28:55 AM »
For me it sets IMAGE_OPTIONAL_HEADER SizeOfStackReserve and SizeOfStackCommit values.
May the source be with you

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: simple question set stack on linker
« Reply #5 on: December 09, 2014, 02:05:43 PM »
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

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: simple question set stack on linker
« Reply #6 on: December 09, 2014, 03:41:38 PM »
Can you see an effect on memory usage seen through task manager?