1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

Kernel: Remove kfree(), leaving only kfree_sized() :^)

There are no more users of the C-style kfree() API in the kernel,
so let's get rid of it and enjoy the new world where we always know
how much memory we are freeing. :^)
This commit is contained in:
Andreas Kling 2021-12-26 18:10:35 +01:00
parent 6eb48f7df6
commit c6c786c992
2 changed files with 2 additions and 7 deletions

View file

@ -273,16 +273,12 @@ void* kmalloc(size_t size)
}
void kfree_sized(void* ptr, size_t size)
{
(void)size;
return kfree(ptr);
}
void kfree(void* ptr)
{
if (!ptr)
return;
VERIFY(size > 0);
kmalloc_verify_nospinlock_held();
SpinlockLocker lock(s_lock);
++g_kfree_call_count;