diff options
author | Andrew Kaster <andrewdkaster@gmail.com> | 2020-05-15 21:30:37 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-20 08:37:50 +0200 |
commit | 2c823473930121aecbacf0422c8372a0912e581b (patch) | |
tree | d862a7ae1e4a4620f2db4643ee86bbe1429e9777 /AK/kmalloc.h | |
parent | 0a2cab09282edf357647d2f6e61f9b0680492dca (diff) | |
download | serenity-2c823473930121aecbacf0422c8372a0912e581b.zip |
AK+LibC: Move non-placement new/delete into LibC
This allows operator new and operator delete to be available to anyone
that links -lc (everyone) rather than just people that include
kmalloc.h (almost no one).
Diffstat (limited to 'AK/kmalloc.h')
-rw-r--r-- | AK/kmalloc.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/AK/kmalloc.h b/AK/kmalloc.h index 6ef4caed0e..c5a7a13e26 100644 --- a/AK/kmalloc.h +++ b/AK/kmalloc.h @@ -52,36 +52,6 @@ # ifdef __serenity__ -inline void* operator new(size_t size) -{ - return kmalloc(size); -} - -inline void operator delete(void* ptr) -{ - return kfree(ptr); -} - -inline void operator delete(void* ptr, size_t) -{ - return kfree(ptr); -} - -inline void* operator new[](size_t size) -{ - return kmalloc(size); -} - -inline void operator delete[](void* ptr) -{ - return kfree(ptr); -} - -inline void operator delete[](void* ptr, size_t) -{ - return kfree(ptr); -} - inline void* operator new(size_t, void* ptr) { return ptr; |