Kernel: Add implementation of operator new and delete to kmalloc.cpp

This was missing before, we were getting it for free from libstdc++
This commit is contained in:
Andrew Kaster 2020-05-15 21:32:22 -06:00 committed by Andreas Kling
parent 2c82347393
commit 6d0d848720
Notes: sideshowbarker 2024-07-19 06:20:40 +09:00

View file

@ -218,3 +218,23 @@ void* operator new[](size_t size)
{
return kmalloc(size);
}
void operator delete(void* ptr)
{
return kfree(ptr);
}
void operator delete(void* ptr, size_t)
{
return kfree(ptr);
}
void operator delete[](void* ptr)
{
return kfree(ptr);
}
void operator delete[](void* ptr, size_t)
{
return kfree(ptr);
}