1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

Everywhere: Run clang-format

This commit is contained in:
Linus Groh 2022-10-17 00:06:11 +02:00
parent 8639d8bc21
commit d26aabff04
140 changed files with 1202 additions and 723 deletions

View file

@ -13,17 +13,23 @@
#define KMALLOC_SCRUB_BYTE 0xbb
#define KFREE_SCRUB_BYTE 0xaa
#define MAKE_ALIGNED_ALLOCATED(type, alignment) \
public: \
[[nodiscard]] void* operator new(size_t) \
{ \
void* ptr = kmalloc_aligned(sizeof(type), alignment); \
VERIFY(ptr); \
return ptr; \
} \
[[nodiscard]] void* operator new(size_t, std::nothrow_t const&) noexcept { return kmalloc_aligned(sizeof(type), alignment); } \
void operator delete(void* ptr) noexcept { kfree_aligned(ptr); } \
\
#define MAKE_ALIGNED_ALLOCATED(type, alignment) \
public: \
[[nodiscard]] void* operator new(size_t) \
{ \
void* ptr = kmalloc_aligned(sizeof(type), alignment); \
VERIFY(ptr); \
return ptr; \
} \
[[nodiscard]] void* operator new(size_t, std::nothrow_t const&) noexcept \
{ \
return kmalloc_aligned(sizeof(type), alignment); \
} \
void operator delete(void* ptr) noexcept \
{ \
kfree_aligned(ptr); \
} \
\
private:
// The C++ standard specifies that the nothrow allocation tag should live in the std namespace.