Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stack size

Status
Not open for further replies.

abp

Programmer
Sep 14, 2000
134
FR
Is there a way to change the stack size for an
executable on Sun. If my program wants more stack
than is provided by default, is there any command
that will do the job ?
Thanks
abp
anand_pillai@delmia.com
 
I can't remember exactly to be honest but have a look at the man page for cc and ln. I'll check tomorrow when I have an HPUX system to look at.
Mike
michael.j.lacey@ntlworld.com
 
You need it for SUN or HP?
On HP go to "Kernel configuration", set whant you whant and recompile kernel.
On SUN you have to open file /etc/system
and add next line:
set lwp_default_stksize=16386
and then type
reboot -- -r

set stack size from 0 to 262144
default on 32-bit 8192 on 64-bit 262144
For other tunable see
Regards.
 
You need to recompile the kernel to change the stack size in a single executable? Are you sure?
Mike
michael.j.lacey@ntlworld.com
 
I am sure that this will work.
Other way:
If you don't want to set this setting as default for your system use next:
ulimit -a
to check current limits
ulimit -s 16386
to set new stack limit
But this will work only for current terminal.
Hope this will help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top