Hi!!,
could someone tell me how to increase the stack size in HP-UX?
Thanx
Hi!!,
could someone tell me how to increase the stack size in HP-UX?
Thanx
The fact that this question is in "c programming" suggests that you want a way for a process to do this. There is a setrlimit(RLIMIT_STACK...) system call, but the soft limit is set to the hard limit by default. Still some shells could crank it back. And a process could reset it back to the hard limit.
But to raise the hard limit you will need to build a new kernel. The easiest way is via sam->kernel configuration->configurable parameters. You need to up maxssiz.
hi jyotipg,
You can try this command on unix terminal on HP-UX system.
prompt>limit stacksize 100kb
now check.
prompt> limit
cputime unlimited
filesize unlimited
datasize unlimited
stacksize 100 kbytes
coredumpsize 200000 kbytes
descriptors 200 files
memoryuse unlimited
hope this might help you,
If you have any more, let me know.
Regards
Anent
Thanx Anent,
but this doesnt help anyway. There is no command like limit on HP-UX. I have tried to use
ulimit -a
this gives the similar upper limits of resouces as posted by you.
on trying to change the resource limits with ULIMIT, I get the following error message
ulimit stacksize 8192kb
sh: stacksize: The specified number is not valid for this command
:rolleyes:
jyotipg,
I used to work in HP-UX 11.00 Workstation.
i had tried out with limit command. Its working fine and hence i suggested you.
ulimit command is an user defined limit command.
Let me know, whether you are working in HP-11.00 or greater system.
If so, you might be getting it right.
Anent
anent,
thanx for ur effort. I am using HP-10.2 and this command doesnt woek on this version.
try ulimit -f
The error you received was due to the following:
ulimit [n] If n is given, impose a size limit of n 512 byte blocks
on files written by child processes (files of any size
can be read). If n is not given, the current limit is
printed.
You don't need to put the kb in there (which is why it gave an error)