mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:27:45 +00:00
Kernel: Declare operator new/delete noexcept for MAKE_SLAB_ALLOCATED
This commit is contained in:
parent
788075c58b
commit
6d39b792f0
1 changed files with 5 additions and 5 deletions
|
@ -21,8 +21,8 @@ void slab_alloc_stats(Function<void(size_t slab_size, size_t allocated, size_t f
|
|||
|
||||
#define MAKE_SLAB_ALLOCATED(type) \
|
||||
public: \
|
||||
void* operator new(size_t) { return slab_alloc(sizeof(type)); } \
|
||||
void operator delete(void* ptr) { slab_dealloc(ptr, sizeof(type)); } \
|
||||
[[nodiscard]] void* operator new(size_t) noexcept { return slab_alloc(sizeof(type)); } \
|
||||
void operator delete(void* ptr) noexcept { slab_dealloc(ptr, sizeof(type)); } \
|
||||
\
|
||||
private:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue