From b7b353a54e7d6d5c2ca292670fea392c32b6d18d Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Thu, 23 Aug 2018 17:53:55 -0400 Subject: [PATCH] print out the calculated slab sizes too --- calculate_waste.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calculate_waste.py b/calculate_waste.py index 9f3789e..4dd0de3 100755 --- a/calculate_waste.py +++ b/calculate_waste.py @@ -38,11 +38,11 @@ def page_align(size): return (size + 4095) & ~4095 print() -print("size class", "slab slots", "worst case internal fragmentation for slabs", sep=", ") +print("size class", "slab slots", "slab size", "worst case internal fragmentation for slabs", sep=", ") for size, slots in zip(size_classes, size_class_slots): used = size * slots real = page_align(used) - print(size, slots, str(100 - used / real * 100) + "%", sep=", ") + print(size, slots, real, str(100 - used / real * 100) + "%", sep=", ") if len(argv) < 2: exit()