From 127f110126824c286d90f93d2e1cec3f411e4388 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Thu, 23 Aug 2018 17:56:17 -0400 Subject: [PATCH] adjust slot count for 10240 byte size class --- calculate_waste.py | 2 +- malloc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/calculate_waste.py b/calculate_waste.py index 4dd0de3..258d307 100755 --- a/calculate_waste.py +++ b/calculate_waste.py @@ -21,7 +21,7 @@ size_class_slots = [ 16, 16, 16, 16, 8, 8, 8, 8, 8, 8, 8, 8, - 5, 6, 4, 4 + 6, 6, 4, 4 ] print("size class", "worst case internal fragmentation", sep=", ") diff --git a/malloc.c b/malloc.c index 63de7e0..be89b31 100644 --- a/malloc.c +++ b/malloc.c @@ -158,7 +158,7 @@ static const uint16_t size_class_slots[] = { /* 256 */ 16, 16, 16, 16, /* 512 */ 8, 8, 8, 8, /* 1024 */ 8, 8, 8, 8, - /* 2048 */ 5, 6, 4, 4 + /* 2048 */ 6, 6, 4, 4 }; #define N_SIZE_CLASSES (sizeof(size_classes) / sizeof(size_classes[0]))