diff --git a/kernel/src/misc/new.cpp b/kernel/src/misc/new.cpp new file mode 100644 index 00000000..8ecd8175 --- /dev/null +++ b/kernel/src/misc/new.cpp @@ -0,0 +1,32 @@ +#include "std/stdlib.h" +#include + +void* operator new(size_t size) +{ + return kmalloc(size); +} + +void* operator new[](size_t size) +{ + return kmalloc(size); +} + +void operator delete(void* p) +{ + kfree(p); +} + +void operator delete[](void* p) +{ + kfree(p); +} + +void operator delete(void* p, size_t) +{ + kfree(p); +} + +void operator delete[](void* p, size_t) +{ + kfree(p); +} \ No newline at end of file