[procps] Re: Final call for procps 3.3.4

  • From: Craig Small <csmall-procps@xxxxxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Sun, 28 Oct 2012 08:51:11 +1100

On Sat, Oct 27, 2012 at 02:12:08PM -0500, Jim Warner wrote:
> Such storage is freed at task end and isn't treated by valgrind as a leak.  
> But if you wanted to exclude it from the valgrind heap summary "in use at 
> exit" category, an approach like this would do the trick:
Wouldn't freeing it right at the end when you clean up ncurses etc fix
this too? You don't have to do it, I was just curious.

> Lastly, I wish you wouldn't be so critical of the library.  It was never 
> desgined to be other than internal to the procps programs.  And while now 
> outdated, I think it has served those programs pretty well for over a decade.
> 
> Personally, I still appreciate Albert's initial library efforts.
It will be 15 years at the end of this year since I took over the Debian
side of procps. I'm not sure when Albert took over the upstream side but
it was around that time.

I think you're both right, it certainly has worked for some time but it
does need a re-think, particularly around the API and the side-effects.
Sami's comment was just after we found the library doing something a
library shouldn't, like re-using memory.

Ideally you have functions that allocate memory once, then functions
that update what is in the values then functions that free what you
allocated.

So I've ignored the changes in this thread around the memory
allocation/deallaction for this release.


-- 
Craig Small VK2XLZ   http://enc.com.au/          csmall at : enc.com.au
Debian GNU/Linux     http://www.debian.org/      csmall at : debian.org
GPG fingerprint:     5D2F B320 B825 D939 04D2  0519 3938 F96B DF50 FEA5

Other related posts: