Operating System - HP-UX
1835691 Members
2441 Online
110082 Solutions
New Discussion

max use unshared memory for a process

 
SOLVED
Go to solution
Franky Leeuwerck
Frequent Advisor

max use unshared memory for a process

How can I detect how much unshared memory can be used at most by 1 process ?

This will definitely be equal to the memory size minus the shared memory, but I would like to know if there are other limits.

HP-UX 11

Thanks in advance

Franky Leeuwerck
3 REPLIES 3
harry d brown jr
Honored Contributor

Re: max use unshared memory for a process

buffer cache:

dbc_max_pct
dbc_min_pct

And about forty other kernel parameters that consume memory.

When in doubt add more memory and use the new memory for your process.

live free or die
harry
Live Free or Die
harry d brown jr
Honored Contributor
Solution

Re: max use unshared memory for a process

Mike Stroyan
Honored Contributor

Re: max use unshared memory for a process

There are many different limits on memory use, so it is complicated to find out which limit a process will reach first. Here is a list-
- All processes are limited by the available swap, which can be checked with "swapinfo -t" or pstat_getswap(). The value will change as other programs use more or less swap. You can cheat a little on swap allocation by using "chatr +z", but you risk an unexpected exit.
- All processes are limited by the ulimit values that you can check with the shell ulimit commands or getrlimit().
- Processes are limited by the kernel maxdsiz or maxdsize_64bit parameters.
- 32-bit processes are limited by the address space. Processes linked with '-N' start mallocing at the top of the text and data areas. Processes linked without '-N' start mallocing around 0x40000000. Their malloc calls are then stopped at 0x80000000 unless the ld/chatr +q3p feature is used to allow them to grow to almost 0xc0000000. The 11i release also has a +q4p feature that allows malloc to reach almost 0xf0000000.

I have attached a couple of programs that report some memory features affecting maximum data size.