diff options
Diffstat (limited to 'Source/Kernel/Core/common.wtf.h')
-rw-r--r-- | Source/Kernel/Core/common.wtf.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/Kernel/Core/common.wtf.h b/Source/Kernel/Core/common.wtf.h index 9b1bc7e..617a73c 100644 --- a/Source/Kernel/Core/common.wtf.h +++ b/Source/Kernel/Core/common.wtf.h @@ -24,4 +24,17 @@ typedef char s8int; #define DEBUG(m) #endif +#include <MemoryManager/Mem.ns.h> + +//Standard implemenations of operator new/delete +inline void* operator new(u32int, void *p) { return p; } +inline void* operator new[](u32int, void *p) { return p; } +inline void operator delete(void*, void*) { } +inline void operator delete[](void*, void*) { } + +inline void* operator new(u32int sz) { return Mem::kalloc(sz); } +inline void* operator new[](u32int sz) { return Mem::kalloc(sz); } +inline void operator delete(void *ptr) { Mem::kfree(ptr); } +inline void operator delete[](void *ptr) { Mem::kfree(ptr); } + #endif |