Free the freelist allocation in start.c test, better logging messages

This commit is contained in:
Imbus 2025-10-01 02:53:03 +02:00
parent cc24fb66eb
commit f6e543b64d

View file

@ -70,13 +70,13 @@ void start() {
fl_init(&fl, (uintptr_t)mem, 4096, sizeof(int));
uint32_t *hello = fl_alloc(&fl);
*hello = UINT32_MAX;
fl_free(&fl, hello);
int a = fl_available(&fl);
assert_msg(fl_check(&fl) > 0, "FreeList checking failed, might be corrupt.");
kprintf("Available: %d\n", a);
kprintf("Size: %d\n", fl.size);
kprintf("Freelist available: %d\n", a);
kprintf("Freelist item size: %d\n", fl.size);
buddy_free(mem);
}