From 4aefedf276586729bba082108eedc5d6c5fd2d81 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 12 Feb 2024 22:45:43 -0500 Subject: [PATCH] slab: record size on `kmalloc(..., ALLOC_KERN);` previously, this size was not recorded, causing krealloc to fail, due to it always copying zero bytes --- mem/slab.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mem/slab.c b/mem/slab.c index f9483f4..fead16e 100644 --- a/mem/slab.c +++ b/mem/slab.c @@ -193,6 +193,7 @@ static void *kmalloc_table(size_t size, size_t *sizes, size_t nsizes, slab_t **c return NULL; } n->value = (uint64_t)slab; + n->value2 = size; return ret; }