Add a "B" suffix to memory quantities in top(1) output.
Otherwise small quantities look nonsensical. For instance, when swapping in a single page we would print "4096 In". Fix code indentation while here. MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
fa83f68917
commit
738b2d5ceb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354829
@ -297,7 +297,8 @@ format_k(int64_t amt)
|
|||||||
|
|
||||||
ret = retarray[index_];
|
ret = retarray[index_];
|
||||||
index_ = (index_ + 1) % NUM_STRINGS;
|
index_ = (index_ + 1) % NUM_STRINGS;
|
||||||
humanize_number(ret, 6, amt * 1024, "", HN_AUTOSCALE, HN_NOSPACE);
|
humanize_number(ret, 6, amt * 1024, "", HN_AUTOSCALE, HN_NOSPACE |
|
||||||
|
HN_B);
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user