From: James Cloos Date: Mon, 6 Feb 2012 05:00:00 +0000 (-0500) Subject: top: postpone the switch from Kb to Mb in summary display X-Git-Tag: v3.3.3~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=95f22017309f0025c724258335cf586b1d939e68;p=procps-ng top: postpone the switch from Kb to Mb in summary display The mem and swap lines have enough room to show eight significant digits, so switch to showing MB when >=100MB, not >=10MB. The extra detail is valuable; it should not be elided. Signed-off-by: James Cloos Signed-off-by: Jim Warner --- diff --git a/top/top.c b/top/top.c index d0b40acc..0baa0274 100644 --- a/top/top.c +++ b/top/top.c @@ -3417,7 +3417,7 @@ static void summary_show (void) { int shift = 0; /*** hotplug_acclimated ***/ - if (kb_main_total > 9999999) + if (kb_main_total > 99999999) { which = N_txt(AMT_megabyte_txt); shift = 10; } if (kb_main_total > 9999999999ull) { which = N_txt(AMT_gigabyte_txt); shift = 20; }