]> granicus.if.org Git - procps-ng/commit
top: exploit the new library API for memory statistics
authorJim Warner <james.warner@comcast.net>
Sun, 28 Jun 2015 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Mon, 29 Jun 2015 11:29:33 +0000 (21:29 +1000)
commitc3fd7473c5e2f8be59b2ac90696e79079f45b5a8
treea5f19263d3877ba6c76482227a6272541ba5a43e
parenta05084f381c3d63c8e1b643f72f4021935d41d8a
top: exploit the new library API for memory statistics

This commit represents the pioneering attempt at using
the concept of 'chained' library requests in an effort
to reduce function call overhead. It required exposing
no more implementation details than were already shown
through the individual calls, yet is satisfied in one.

It is just such an approach that will prove invaluable
when it comes time to access individual /proc/##/data.
Programs could 'chain' only those 'results' structures
representing their current view independent of all the
fields any such programs might be prepared to display.

Thus the standard 'read', which wouldn't apply to task
level data very well (or efficiently), can now become
a 'read_chain' whereby the former PROC_FILL flags need
can be satisfied & yield the minimum open/close calls.

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c
top/top_nls.c
top/top_nls.h