]> granicus.if.org Git - procps-ng/commit
library: refactor exposed pointers management, 3rd gen
authorJim Warner <james.warner@comcast.net>
Fri, 1 Jul 2016 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Sat, 2 Jul 2016 06:33:01 +0000 (16:33 +1000)
commit80ad63dc319298c87af1df9edef55d36b665b7bb
treec2247c02655f5f558b428ea2028d53a4198ba15c
parent4fe52ccd441a23b554828f7c273582d32e16666f
library: refactor exposed pointers management, 3rd gen

This commit brings all of those 'fetch' type functions
(supporting some form of 'reap') into closer alignment
with one another. The biggest impact is to be found in
the <stat> module, which now provides for the separate
copy of stack pointers which will be exposed to users.

The reason such a copy was not employed initially with
<stat>, unlike those for <pids> and <slabinfo>, is due
to the fact that such stacks were never sortable. Thus
the original raw consolidated extent pointers wouldn't
have been disturbed. But that meant no NULL delimiter.

So with this commit, all reap/fetch operations now use
pointer copies when returning results to callers. And,
all such arrays are now NULL delimited meaning callers
can choose their own access fencepost: totals or NULL.

Signed-off-by: Jim Warner <james.warner@comcast.net>
proc/pids.c
proc/slabinfo.c
proc/stat.c