Operating System - HP-UX
1752569 Members
5314 Online
108788 Solutions
New Discussion

Re: How to allocate MAX memory per process in HP-UX (PA-RISC) machine

 
gireeshk7
Occasional Contributor

How to allocate MAX memory per process in HPUX(Risc) machine

Hi All ,

 

How to set memory per process,

 

Because I am getting error like

 

[11] % ./test_mem.out

Total Memory Allocated to process so far: 1 MB

Total Memory Allocated to process so far: 3 MB

Total Memory Allocated to process so far: 6 MB

Total Memory Allocated to process so far: 10 MB

Total Memory Allocated to process so far: 15 MB

Total Memory Allocated to process so far: 21 MB

Total Memory Allocated to process so far: 28 MB

Total Memory Allocated to process so far: 36 MB

Total Memory Allocated to process so far: 45 MB

Total Memory Allocated to process so far: 55 MB

Total Memory Allocated to process so far: 66 MB

Total Memory Allocated to process so far: 78 MB

Total Memory Allocated to process so far: 91 MB

Total Memory Allocated to process so far: 105 MB

Total Memory Allocated to process so far: 120 MB

Total Memory Allocated to process so far: 136 MB

Total Memory Allocated to process so far: 153 MB

Total Memory Allocated to process so far: 171 MB

Total Memory Allocated to process so far: 190 MB

Total Memory Allocated to process so far: 210 MB

Total Memory Allocated to process so far: 231 MB

Total Memory Allocated to process so far: 253 MB

Total Memory Allocated to process so far: 276 MB

Total Memory Allocated to process so far: 300 MB

Total Memory Allocated to process so far: 325 MB

Total Memory Allocated to process so far: 351 MB

Total Memory Allocated to process so far: 378 MB

Total Memory Allocated to process so far: 406 MB

Total Memory Allocated to process so far: 435 MB

Total Memory Allocated to process so far: 465 MB

Total Memory Allocated to process so far: 496 MB

Total Memory Allocated to process so far: 528 MB

Total Memory Allocated to process so far: 561 MB

Total Memory Allocated to process so far: 595 MB

Total Memory Allocated to process so far: 630 MB

Total Memory Allocated to process so far: 666 MB

Total Memory Allocated to process so far: 703 MB

Total Memory Allocated to process so far: 741 MB

 

Error (re)allocating memory!!!! Exiting!!!!

 

[7] % uname -a
HP-UX getz B.11.23 U 9000/800 1203405514 unlimited-user license


[8] % ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         3968588
stack(kbytes)        262144
memory(kbytes)       unlimited
coredump(blocks)     4194303
nofiles(descriptors)

 

 2048[11] % ulimit -Ha
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         3968588
stack(kbytes)        262144
memory(kbytes)       unlimited
coredump(blocks)     unlimited
nofiles(descriptors) 4096

 

Thanks & Regards

Giresha P.H


 

1 REPLY 1
Dennis Handly
Acclaimed Contributor

Re: How to allocate MAX memory per process in HP-UX (PA-RISC) machine

>How to set memory per process?

 

How much do you want?  The simplest way is to port to 64 bits then you can have up to maxdsiz_64bit.

Otherwise you can link with -N and get up to 2 Gb.

 

>data(kbytes)         3968588
>stack(kbytes)          262144

 

Your 32 bit limit is 3.9 Gb but you can only get that with -N and using chatr(1).

Your large maxssiz is also removing 262 Mb from that limit, you can reduce it to 100 Mb and get that back right away by setting a smaller value: ulimit -Ss 100000