]> git.itanic.dy.fi Git - scan-pagemap/commitdiff
Analyzer: Drop PRETTY_THRESH value to 98
authorTimo Kokkonen <kaapeli@itanic.dy.fi>
Sat, 21 Aug 2010 07:18:24 +0000 (10:18 +0300)
committerTimo Kokkonen <kaapeli@itanic.dy.fi>
Sat, 21 Aug 2010 07:18:24 +0000 (10:18 +0300)
We have reserved five digits for the byte sizes in the print
output. However, if the size of a process happens to be for example
101272kB, the size is still below the 100 * 1024 = 102400 kB
threshold, which has in fact six digits.

Lowering the threshold to 98 will ensure the pretty output is never
more than five digits.

Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
analyze.c

index 0e4982b900833e392125a520d2509c26e1a6b792..309043179c97c4fb321b0e1f63c874aed7278388 100644 (file)
--- a/analyze.c
+++ b/analyze.c
@@ -9,7 +9,7 @@
 #define SI_M   (SI_k * SI_k)
 #define SI_G   (SI_M * SI_k)
 
-#define PRETTY_THRESH  100
+#define PRETTY_THRESH  98
 #define NICE_DIV(a)                                                    \
        ((a) < SI_k * 4 ? (a) :                         \
                (a < SI_M * PRETTY_THRESH ? ((a) / SI_k) :              \