Re:Re: Potential memory leaks reported by Valgrind against some frequently used commands
It's a surprise that you replied this email so quickly. Thanks for your timely comments! Several days ago, I ever posted to firstname.lastname@example.org, but got no response.
BTW, I ever tried on Redhat Linux 9, no such problem.
At 2011-03-01 20:04:16，"Michael Tokarev" <email@example.com> wrote:
>01.03.2011 14:56, Aron Xu wrote:
>> On Tue, Mar 1, 2011 at 19:54, Olaf van der Spek <firstname.lastname@example.org> wrote:
>>> 2011/3/1 ximalaya <email@example.com>:
>>>> I notice that, valgrind reports memory leaks against some frequently used
>>>> commands on Debian 6.0, 5.0.7 and 4.0. These commands include netstat, ps
>>>> -ef, ls -latr, top, etc.
>>> For short-running processes that's generally not a problem.
>> It would be good if we fix them, :)
>There are at least two kinds of "memory leaks" which may be present
>and reported here. One is a single memory buffer allocated (and may
>be reallocated) for some one-time task and not freed. And another
>may be a missing free for every object a program iterates - like
>in case of ls, a memleak of an object for every file it lists.
>First kinds of memory "leaks" are definitely _not_ worth to fix,
>because if we'll exit right away anyway, kernel will free all our
>memory in one go after process termination, and by using free()
>we just wating CPU time and gains nothing at all.
>But second kind of leaks is definitely worth to fix, for obvious
>reason: tools like ls(1) should not grow their memory without
>But I suspect there are only kind-1 "leaks" you found, at least
>the ones which are reported are all of this sort.
>To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
>with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org