]> granicus.if.org Git - procps-ng/commit
top: avoid an unnecessary conversion for 'USED' column
authorJim Warner <james.warner@comcast.net>
Sat, 1 Aug 2015 15:52:20 +0000 (10:52 -0500)
committerCraig Small <csmall@enc.com.au>
Sun, 23 Aug 2015 11:01:21 +0000 (21:01 +1000)
commitb7fe46a815cf695e4dae2d3cd378338b7db4d762
treec23c9bf7bb97855946ad15c7c70d1f89db692039
parent479845d4f0be3234b9684d69c2a37046920acf98
top: avoid an unnecessary conversion for 'USED' column

When the USED column was introduced the proc_t.vm_swap
& proc_t.resident values were added together. However,
using 'resident' required an additional PROC_FILL flag
not to mention extra conversion of pages to kibibytes.

So now we'll use an already present vm_rss value which
removes any special handling for top's derived column.

And while we're at it we'll trade some more 'resident'
field uses with that more immediately usable 'vm_rss'.

[ this commit has been adapted for the newlib branch ]

Reference(s):
commit 709785e20bd19dc28546d19c45bb7444a56f88b9

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