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 ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
setrlimitprogrammatically 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.