1833013 Members
2641 Online
110048 Solutions
New Discussion

application and memory

 
navin
Super Advisor

application and memory

Hello All,
Is memory leak issue with an application relates to any of the os issues
Thanks
Learning ...
5 REPLIES 5
Bill Hassell
Honored Contributor

Re: application and memory

Far, far too vague to offer any help. A memory leak is almost always a programming mistake. Most programmers will blame it on the OS but HP-UX is just doing what it was asked to do. Occasionally, a standard OS library may cause a program problem but it is very rare these days. The answer is to debug the program to see where the extra memory is being requested and not returned.

If you did not write the program, it is very easy to blame the OS because troubleshooting the program may require vendor support.


Bill Hassell, sysadmin
whiteknight
Honored Contributor

Re: application and memory

Navin,

Memory leak is very subjective, can be due to application or due to our OS. If it is OS related we can use kmeminfo tool to see, but you need to request from HP Response Center

Usually memory arena that have memory leaks

M_TEMP
ALLOC_MBLK_SM
Superpage pool
ALLOCB_MBLK_LM

usually patches will fix the issue

Hope this help.

WK
don't forget to assign points
Problem never ends, you must know how to fix it
Dennis Handly
Acclaimed Contributor

Re: application and memory

As Bill says, this is most likely an application problem.

>whiteknight: Memory leak is very subjective, can be due to application or due to our OS

I wouldn't think so. It either is or isn't an application problem. Tools like gdb's heap checking or purify may help.

The only thing that might be subjective is heap fragmentation. This may look and smell like a leak but there is nothing that can be done about this other than to change the application to not allocate random sizes.

Sajjad Sahir
Honored Contributor

Re: application and memory

Dear Navin

in simple words a memory leak is have the code run for longer periods. If memory continually grows, then there is probably problem.

thanks and regards

Sajjad Sahir
Steven E. Protter
Exalted Contributor

Re: application and memory

Shalom,

Memory leak detector:

http://www.hpux.ws/?p=8

As to prior comments: I think it would be better to present ones own views rather than cutting, pasting and parsing the comments of others.

Disagreement of others opinion is common on this forum, but there are long standing practices here that should be adhered to.

The utility I posted will spot memory leaks over time, is in use on several HP-UX versions.

Assuming your problem is with a top memory user, and thats likely, this tool will help you identify the offending utility.

It is always a good idea to have a recent bi-annual patch set installed for our OS. If you are encountering memory leak problems traced to the OS, you can do an additional search of patches in the term memory leak, read the notes and decide on installation.

Nine times out of ten, when I receive a report of memory leaks, its with the application code. I recall Red Hat once built a memory leak into cluster manager, but normally its a problem with in house or third party software and poor Q&A on that software.

The leak utility will at least provide you with a list of suspects.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com