main: cleanup kmalloc test

This commit is contained in:
Michael Shaw 2023-05-11 12:54:31 -04:00
commit ba332e0e55

View file

@ -106,12 +106,13 @@ static void kmalloc_init_test()
void *a = kmalloc(0x1000, ALLOC_KERN); void *a = kmalloc(0x1000, ALLOC_KERN);
kfree(a); kfree(a);
void *b = kmalloc(0x1000, ALLOC_KERN); void *b = kmalloc(0x1000, ALLOC_KERN);
kfree(b);
if (a != b) { if (a != b) {
printf(LOG_DEBUG "kmalloc consistency test failed\n"); printf(LOG_DEBUG "kmalloc consistency test failed\n");
} else { } else {
printf(LOG_DEBUG "kmalloc consistency test passed\n"); printf(LOG_DEBUG "kmalloc consistency test passed\n");
} }
kfree(b);
} }
#endif /* KDEBUG */ #endif /* KDEBUG */