How do I increase the stack size for executables built with scons on Solaris?
I am working with scons and am trying to compile a program that require bigger stack size but I dont know how to extend the stack size. This is on a solaris machine, and we 开发者_运维知识库use scons to compile our projects.
Anyone know how to do this ?
In the shell (ksh example) prior to executing your program you can use ulimit -s <size in kbytes>
. You may need elevated privileges to change it.
You can also use setrlimit
programmatically but from the man page it won't adjust the currently running process so it's probably not helpful for your needs.
Also consider what about your program needs the larger stack size. Is there a way you can change your design to be more stack friendly? The Solaris default seems to be 10M which is a fairly large stack.
精彩评论