Operating System - HP-UX
1848131 Members
8792 Online
104022 Solutions
New Discussion

memory allocation problems (ENOMEM errno code) and maxsiz system parameters

 
Bertrand Retif
Occasional Contributor

memory allocation problems (ENOMEM errno code) and maxsiz system parameters

Hi *,

I'm running a proprietary C++ process under HPUX 11.00 (hardware is an
HP L2000, 2 CPUs, 2 Gb RAM, 2 Gb swap).
This process uses a HUGE amount of memory.
After 2 hours and a half of processing, it always dies, killed by a
system process that detects a memory allocation problem !

This is the end of the output of tusc (the truss-like tool for HPUX) :

brk(0x67f31000)
....................................................................................
ERR#12 ENOMEM
Received signal 6, SIGABRT, in kill(), [caught], no siginfo
Received signal 6, SIGABRT, in kill(), [SIG_DFL], no siginfo
exit(6) [implicit (kill failure)]
..................................................................
WIFSIGNALED(SIGABRT)

In order to solve these problems, I have tried to set with sam bigger
system parameters like maxdsiz, maxssiz, maxtsiz,
but this is not sufficient :
maxdsiz=3221225472
maxssiz=401604608
maxtsiz=1073741824

These values are the max I can set with sam, but the process seems to
allocate more memory !!!
Do I have to set other system parameters ?

In addition, is there any tool (except ps and top) that can check in
real-time the amount of memory of my process ?
top is useful, but I loose all the memory info when the process dies ...
:-(((
with ps, I have to write a dedicated script that polls regularly the
process :-(((

thanks in advance for any help ...
brgds,
Bertrand.
1 REPLY 1
John Palmer
Honored Contributor

Re: memory allocation problems (ENOMEM errno code) and maxsiz system parameters

Hi,

It sounds as though your process may be using up all the available swap space.

You say that you have 2Gb of device swap, what is your kernel parameter 'swapmem_on' set to? If 0 then 2Gb is your limit, if 1 then you will have an effective limit of about 3.5Gb.

Check your swap usage with swapinfo -mt
note that if swapmem_on is 1 then this will output a line starting 'memory...'.

The best tool for monitoring process memory usage is 'glance'. This is a purchasable product but you can install a 60 day evaluation copy from your Application CD #2.

Regards,
John