mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:07:44 +00: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 KMALLOC_SCRUB_BYTE 0xbb
|
||||||
#define KFREE_SCRUB_BYTE 0xaa
|
#define KFREE_SCRUB_BYTE 0xaa
|
||||||
|
|
||||||
#define MAKE_ALIGNED_ALLOCATED(type, alignment) \
|
#define MAKE_ALIGNED_ALLOCATED(type, alignment) \
|
||||||
public: \
|
public: \
|
||||||
void* operator new(size_t) { return kmalloc_aligned<alignment>(sizeof(type)); } \
|
[[nodiscard]] void* operator new(size_t) noexcept { return kmalloc_aligned<alignment>(sizeof(type)); } \
|
||||||
void operator delete(void* ptr) { kfree_aligned(ptr); } \
|
void operator delete(void* ptr) noexcept { kfree_aligned(ptr); } \
|
||||||
\
|
\
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void kmalloc_init();
|
void kmalloc_init();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue