Reputation:
I'm looking for a way to increase the stack size, for my program to run, the reason is that I've a recursive call causing a stack overflow. Is there anyway I can change the default stack size?
Upvotes: 1
Views: 3604
Reputation: 3397
Its compiler dependent. In Visual studio stacksize is fixed to 1 MB. You can increase it using /STACK linker option.
Upvotes: 0
Reputation: 11606
If its a *NIX, use
ulimit -s <number_in_kb>
You'd set that in your environment before running your program. You can also set it programatically as described in this answer.
You can view the current value by running ulimit -a
.
Upvotes: 2
Reputation:
Use editbin to change the stack size of the program:
EDITBIN.EXE /STACK: yourprogram.exe
Upvotes: 1