mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
Kernel: Declare operator new/delete noexcept for MAKE_ALIGNED_ALLOCATED
This commit is contained in:
parent
97adaaf933
commit
788075c58b
1 changed files with 5 additions and 5 deletions
|
@ -12,11 +12,11 @@
|
|||
#define KMALLOC_SCRUB_BYTE 0xbb
|
||||
#define KFREE_SCRUB_BYTE 0xaa
|
||||
|
||||
#define MAKE_ALIGNED_ALLOCATED(type, alignment) \
|
||||
public: \
|
||||
void* operator new(size_t) { return kmalloc_aligned<alignment>(sizeof(type)); } \
|
||||
void operator delete(void* ptr) { kfree_aligned(ptr); } \
|
||||
\
|
||||
#define MAKE_ALIGNED_ALLOCATED(type, alignment) \
|
||||
public: \
|
||||
[[nodiscard]] void* operator new(size_t) noexcept { return kmalloc_aligned<alignment>(sizeof(type)); } \
|
||||
void operator delete(void* ptr) noexcept { kfree_aligned(ptr); } \
|
||||
\
|
||||
private:
|
||||
|
||||
void kmalloc_init();
|
||||
|
|
Loading…
Add table
Reference in a new issue