From 8d61e632746395fe892f1d7ad2f02428f6d8726e Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sun, 16 Jan 2022 20:50:49 -0500 Subject: [PATCH] add comment about special small size classes --- h_malloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/h_malloc.c b/h_malloc.c index 13bf763..fd5e766 100644 --- a/h_malloc.c +++ b/h_malloc.c @@ -193,6 +193,7 @@ static inline struct size_info get_size_info(size_t size) { if (size == 0) { return (struct size_info){0, 0}; } + // size <= 64 is needed for correctness and raising it to size <= 128 is an optimization if (size <= 128) { return (struct size_info){align(size, 16), ((size - 1) >> 4) + 1}; }