From 4b272148f5eecb5b1d228d7b0a84d560c9c0049a Mon Sep 17 00:00:00 2001 From: dzaima Date: Sun, 14 Aug 2022 11:14:43 +0300 Subject: [PATCH] make allocL after splitTo call skip empty bucket checking --- src/opt/mm_buddyTemplate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/opt/mm_buddyTemplate.c b/src/opt/mm_buddyTemplate.c index aa64749c..e1222b70 100644 --- a/src/opt/mm_buddyTemplate.c +++ b/src/opt/mm_buddyTemplate.c @@ -56,6 +56,7 @@ static NOINLINE void* BN(allocateMore)(i64 bucket, u8 type, i64 from, i64 to) { c->next = 0; vg_undef_p(c, sz); BN(splitTo)(c, from, to, false); + assert(buckets[bucket]!=NULL); return BN(allocL)(bucket, type); } @@ -74,6 +75,7 @@ NOINLINE void* BN(allocS)(i64 bucket, u8 type) { if (from >= ALSZ) return BN(allocateMore)(bucket, type, from, to); } BN(splitTo)(c, from, to, true); + assert(buckets[bucket]!=NULL); return BN(allocL)(bucket, type); }