Why stack is so big under HP IA 64!

I use the command procsize -p processID to get the memory usage of my programme. No matter the programme is simple or complicated, the STACK of the command "procsize -p processID" is alway is about 98M? Even my programme just wrote a string to a file?

Is there any system variable I should set if I want the stack is getiing smmaller/

Re: Why stack is so big under HP IA 64!

Yes -- IPF stacks are created with the maximum virtual size by the kernel (without going into gory internals... they grow from high to low addresses, nothing else does -- and the metadata simply doesn't support that well... so it is a great deal simpler to only grow them physically). They're also created as lazy swap -- so there's no cost to this. [On PA, the stack virtual address space required is reserved and swap is reserved when the stack grows... so this is functionally identical].

Hence if you look solely at the virtual size of the stack, you will see it at maxssiz or maxssiz_64bit depending if the process is 32 or 64-bit (and what the value was at the time of the process starting if you've changed it). If procsize has an option to private RES (physical memory consumption) you should see much more variety in stack consumption (and for simply programs probably only 1 to 4 pages).

You could make it lower by lowering maxssiz... but unless you really need to, there's very little point.