In order to compile one of my apps i had to use /STACK 1000000,1000000... My question is would it hurt to always use this when compiling all of my apps?
For general purpose win32 coding, you don't have to use the switch /STACK
Vortex,
you are not quite right on this, because i used to write a binary-tree database with deep recursion and i had to use /stack option to avoid overflow.
If /stack option is not specified then there must be a default size. Can anybody tell me what it is?
iam not sure if i am right but i was reading somewhere that said default size is 1MB.. Will it hurt to always compile with /STACK even if i didnt need it.. The reason i ask is if i make a batch file to run ml, rc, link ect i wouldnt have to do it for each program i make.. I could pass in the path to link, ml and such while i pass in the file name of the asm file and rc file that needs to be built.
Stack size ajustment is normally done with the linker with the StackReserve and StackCommit options. The /STACK switch in masm is a left over from DOS and should not be used.
can you give more info plesase... MSDN didnt return anything on that in my search other than /STACK.
Run LINK.EXE /? and read the options.
/STACK:reserve[,commit]
thats what i was doing.... my question is would it hurt if i did that on every app i make even my app dont need that much?
Probably not but keep in mind that if an app does not need it, you are reserving more memory than you need and this can come into play on a busy machine. The defaut stack size on a PE file is usually 1 meg and you have to have reasonably deep recursion to go past that.
That answered my question perfectly and is what i thought but i wasnt sure... I guess i can always limit it down or better yet i am not sure ill ever need that much space but it is possibly that i could which is why i had it at that. Thanks for the support :bg