[procps] Re: How to correctly use readtask (or: please expose free_acquired)

  • From: Craig Small <csmall-procps@xxxxxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Sun, 26 May 2013 08:28:22 +1000

On Thu, May 23, 2013 at 12:35:05PM -0700, Andy Lutomirski wrote:
> The memory management semantics for proc_t is kind of poorly
> documented and really hard to work with.  There are two modes:
And that's putting it nicely!

> Can you either provide some (actual, documented) guidance on how this
> is supposed to work and/or improve the API a bit?  Something like
> free_static_proc that does free_acquire(0) would be nice.  allocproc
> would be a decent alternative (it could just malloc a proc_t and
> memset it to 0, but it would be clear what's going on).
The API basically grew out of an internal only to be used by procps
library so there is no real documentation besides the tools themselves.
I don't think anyone has the inclination to document it. I know
personally if I was playing in that area of procps it would be to fix it
not document it.

I know that's probably not the answer you wanted Andy but it's the
honest one.

 - Craig
-- 
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: