mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 10:12:25 -05:00
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:
parent
2c82347393
commit
6d0d848720
Notes:
sideshowbarker
2024-07-19 06:20:40 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/6d0d8487201 Pull-request: https://github.com/SerenityOS/serenity/pull/2242 Reviewed-by: https://github.com/bugaevc
1 changed files with 20 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue