cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with memory leak

 
SOLVED
Go to solution
Highlighted
New Member

Problem with memory leak

Hi,
This is my 1st post here...and if i am not posting at the right place then i am extrememly sorry. I am facing a rather weired problem. I have a C++ binary running on HP-UX. The output of top as well as glance shows periodic increase in memory. But when i use gdb to detect it, i dnt get the desired output...gdb says...no leaks found. Just to mention that I have used gdb earlier to track memory leaks and it is quite efficient in that. But now , even though the memory keeps increasing, i dnt get any leak info from gdb.
It will be really great if someone can provide some help...or atleast tell me where i can get help.

Regards,
Kaushik
4 REPLIES 4
Highlighted
Honored Contributor

Re: Problem with memory leak

Hi

This is a copy of a HP doc

Read and request the tools from your local response centre if you need them

http://docs.google.com/View?docid=dc7s6mzr_56cgsg9g


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Highlighted
Acclaimed Contributor
Solution

Re: Problem with memory leak

You might want to look at this other thread:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1182798

Did you use "info heap"? Did it show the " Heap Size" increasing but not the "Outstanding Allocations"?
Highlighted
New Member

Re: Problem with memory leak

Hi,

Thnx for ur replies. I checked the thread. But in my case, it is different. Both heap size and outstanding allocation are increasing. i took three outputs of info heap in a hour at an interval 0f 20 mins...the result is as follows:
1. Heap size = 876201528
Outstanding = 848278668

2. Heap size = 878167608
Outstanding = 848495917

3. Heap size = 878560824
Outstanding = 850531303

Also mine is a multi-threaded program with arnd 90 threads running at any given time.
Attaching gdb only shows a leak of 1400 bytes in the first run...every time from then on, it simply says no leaks found.

Regards,
Kaushik
Highlighted
Acclaimed Contributor

Re: Problem with memory leak

>Both heap size and outstanding allocation are increasing.
>1. Outstanding = 848278668
>3. Outstanding = 850531303

That should be a leak gdb can detect. That's about 2 Mb so far. Do you have the latest version?

>Also mine is a multi-threaded program with around 90 threads

Do you have the latest libc/libpthread patches installed?

>Attaching gdb only shows a leak of 1400 bytes in the first run

Did you get that one fixed? :-)