Hi all, It's a surprise that you replied this email so quickly. Thanks for your timely comments! Several days ago, I ever posted to [email protected], but got no response.
BTW, I ever tried on Redhat Linux 9, no such problem. Thanks, Xmly At 2011-03-01 20:04:16,"Michael Tokarev" <[email protected]> wrote: >01.03.2011 14:56, Aron Xu wrote: >> On Tue, Mar 1, 2011 at 19:54, Olaf van der Spek <[email protected]> wrote: >>> 2011/3/1 ximalaya <[email protected]>: >>>> 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 >bounds. > >But I suspect there are only kind-1 "leaks" you found, at least >the ones which are reported are all of this sort. > >Thanks! > >/mjt > > >-- >To UNSUBSCRIBE, email to [email protected] >with a subject of "unsubscribe". Trouble? Contact [email protected] >Archive: http://lists.debian.org/[email protected] >

