From a874a61099337dad11920a9ea60ebdf1dd8acee1 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Thu, 23 Aug 2018 17:57:09 -0400 Subject: [PATCH] adjust slot count for 12288 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 258d307..016a00f 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, - 6, 6, 4, 4 + 6, 5, 4, 4 ] print("size class", "worst case internal fragmentation", sep=", ") diff --git a/malloc.c b/malloc.c index be89b31..7df1ecc 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 */ 6, 6, 4, 4 + /* 2048 */ 6, 5, 4, 4 }; #define N_SIZE_CLASSES (sizeof(size_classes) / sizeof(size_classes[0]))