bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Minor patch


From: Bob Proulx
Subject: Re: Minor patch
Date: Sun, 26 Feb 2006 17:46:40 +1300
User-agent: Mutt/1.5.9i

Jim Meyering wrote:
> I've debated for years whether to free such memory.

Since they are not memory leaks I would avoid freeing the memory.  It
creates more (unnecessary) work for malloc() which in some cases could
be significant.  CPU time spent there is completely wasted heat and
electricity, even if a small value.  It would be justified if it
improved programmer productivity but I don't think in this case that
it does.

> On one hand, it's not technically necessary, but on the other,
> doing so reassures people who take the time to perform an audit.

Gently educating the auditor will have the better benefit by making
them aware of an important facet of C programming.  With this in mind
future audits will be of even higher quality.  And as you point out
valgrind does not mark those blocks as being lost.  It is not even
reporting them as a problem.  So in some ways this is just an
education of how valgrind operates and reports information.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]