From 6673bb9357b9ed8187f3dcb2917e2c6a9da25ee7 Mon Sep 17 00:00:00 2001 From: nodist Date: Mon, 12 Oct 2026 13:44:57 -0400 Subject: multiple slab test --- source/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/memory.c') diff --git a/source/memory.c b/source/memory.c index d7618a7..a9bcc30 100644 --- a/source/memory.c +++ b/source/memory.c @@ -56,7 +56,7 @@ static const int32_t pages_per_pow2[] = { [19] = 128, [20] = 256, [21] = 512, - [22] = 1024, + [22] = 1024 }; static kpl_memory_allocator_slab *kpl_memory_allocator_slab_init(int32_t size_pow2) { @@ -94,7 +94,7 @@ static kpl_object *kpl_memory_allocator_slab_allocate(kpl_memory_allocator_slab_ } void *kpl_memory_allocator_allocate(kpl_memory_allocator *memory_allocator, int32_t size, int32_t thread_id) { - if (size < (1 << KPL_MEMORY_ALLOCATOR_MIN_ROUND_SIZE_POW2)) + if (size < 1 << KPL_MEMORY_ALLOCATOR_MIN_ROUND_SIZE_POW2) return NULL; int32_t size_pow2 = kpl_memory_allocator_get_size_pow2(size); if (size_pow2 < KPL_MEMORY_ALLOCATOR_MIN_SIZE_POW2) -- cgit v1.2.3