diff options
author | Andreas Kling <kling@serenityos.org> | 2020-01-25 16:59:21 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-01-25 16:59:21 +0100 |
commit | 603bf6fb4a0dcb97cc7d19d8a106558a174d7136 (patch) | |
tree | ee7e9bd4f59c7f4cf0a693cdd26308606b68848d /AK | |
parent | 81ddd2dae0f8c9ed94b6fd4a0f10b7cfd2a38afe (diff) | |
download | serenity-603bf6fb4a0dcb97cc7d19d8a106558a174d7136.zip |
Build: Remove -fno-sized-deallocation -Wno-sized-deallocation
Add sized variants of the global operator delete functions so we don't
have to use these GCC options anymore.
Diffstat (limited to 'AK')
-rw-r--r-- | AK/kmalloc.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/AK/kmalloc.h b/AK/kmalloc.h index 6e0c864488..0d071972b4 100644 --- a/AK/kmalloc.h +++ b/AK/kmalloc.h @@ -47,6 +47,7 @@ # define krealloc realloc # ifdef __serenity__ + inline void* operator new(size_t size) { return kmalloc(size); @@ -57,6 +58,11 @@ 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); @@ -67,6 +73,11 @@ 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; |