|
Home > Archive > Unix Programming > October 2005 > using top utility to monitor process's possible mem leak
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
using top utility to monitor process's possible mem leak
|
|
| wenmang@yahoo.com 2005-10-24, 3:48 pm |
| Hi,
I am trying to see whether a process has mem leak or not. I am suing
top utility program to do so. After the program is done with load test,
I cannot see that the program size is not graduately dropping as I
expect. I understand that it may take sometime before OS gets back the
heap memory, but is it a good way to monitor mem leak through top?
thans.
| |
| Eric Sosman 2005-10-24, 3:49 pm |
|
wenmang@yahoo.com wrote On 10/24/05 11:05,:
> Hi,
> I am trying to see whether a process has mem leak or not. I am suing
> top utility program to do so. After the program is done with load test,
> I cannot see that the program size is not graduately dropping as I
> expect. I understand that it may take sometime before OS gets back the
> heap memory, but is it a good way to monitor mem leak through top?
> thans.
"Most implementations of malloc/free do not return freed
memory to the operating system (if there is one), but
merely make it available for future malloc calls within
the same program."
-- comp.lang.c Frequently Asked Question #7.25
http://www.eskimo.com/~scs/C-faq/top.html
--
Eric.Sosman@sun.com
| |
| Joe Estock 2005-10-24, 3:49 pm |
| wenmang@yahoo.com wrote:
> Hi,
> I am trying to see whether a process has mem leak or not. I am suing
> top utility program to do so. After the program is done with load test,
> I cannot see that the program size is not graduately dropping as I
> expect. I understand that it may take sometime before OS gets back the
> heap memory, but is it a good way to monitor mem leak through top?
> thans.
>
Try valgrind [ http://www.valgrind.org/ ]. It's an excellent tool for
memory related issues/concerns.
|
|
|
|
|