mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:47:34 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
0376c127f6
commit
086969277e
1665 changed files with 8479 additions and 8479 deletions
|
@ -33,9 +33,9 @@ class Heap {
|
|||
{
|
||||
return (AllocationHeader*)((((u8*)ptr) - sizeof(AllocationHeader)));
|
||||
}
|
||||
ALWAYS_INLINE const AllocationHeader* allocation_header(const void* ptr) const
|
||||
ALWAYS_INLINE AllocationHeader const* allocation_header(void const* ptr) const
|
||||
{
|
||||
return (const AllocationHeader*)((((const u8*)ptr) - sizeof(AllocationHeader)));
|
||||
return (AllocationHeader const*)((((u8 const*)ptr) - sizeof(AllocationHeader)));
|
||||
}
|
||||
|
||||
static size_t calculate_chunks(size_t memory_size)
|
||||
|
@ -120,12 +120,12 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool contains(const void* ptr) const
|
||||
bool contains(void const* ptr) const
|
||||
{
|
||||
const auto* a = allocation_header(ptr);
|
||||
if ((const u8*)a < m_chunks)
|
||||
auto const* a = allocation_header(ptr);
|
||||
if ((u8 const*)a < m_chunks)
|
||||
return false;
|
||||
if ((const u8*)ptr >= m_chunks + m_total_chunks * CHUNK_SIZE)
|
||||
if ((u8 const*)ptr >= m_chunks + m_total_chunks * CHUNK_SIZE)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -520,7 +520,7 @@ void* operator new(size_t size)
|
|||
return ptr;
|
||||
}
|
||||
|
||||
void* operator new(size_t size, const std::nothrow_t&) noexcept
|
||||
void* operator new(size_t size, std::nothrow_t const&) noexcept
|
||||
{
|
||||
return kmalloc(size);
|
||||
}
|
||||
|
@ -532,7 +532,7 @@ void* operator new(size_t size, std::align_val_t al)
|
|||
return ptr;
|
||||
}
|
||||
|
||||
void* operator new(size_t size, std::align_val_t al, const std::nothrow_t&) noexcept
|
||||
void* operator new(size_t size, std::align_val_t al, std::nothrow_t const&) noexcept
|
||||
{
|
||||
return kmalloc_aligned(size, (size_t)al);
|
||||
}
|
||||
|
@ -544,7 +544,7 @@ void* operator new[](size_t size)
|
|||
return ptr;
|
||||
}
|
||||
|
||||
void* operator new[](size_t size, const std::nothrow_t&) noexcept
|
||||
void* operator new[](size_t size, std::nothrow_t const&) noexcept
|
||||
{
|
||||
return kmalloc(size);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
VERIFY(ptr); \
|
||||
return ptr; \
|
||||
} \
|
||||
[[nodiscard]] void* operator new(size_t, const std::nothrow_t&) noexcept { return kmalloc_aligned(sizeof(type), alignment); } \
|
||||
[[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:
|
||||
|
@ -56,9 +56,9 @@ inline void* operator new(size_t, void* p) { return p; }
|
|||
inline void* operator new[](size_t, void* p) { return p; }
|
||||
|
||||
[[nodiscard]] void* operator new(size_t size);
|
||||
[[nodiscard]] void* operator new(size_t size, const std::nothrow_t&) noexcept;
|
||||
[[nodiscard]] void* operator new(size_t size, std::nothrow_t const&) noexcept;
|
||||
[[nodiscard]] void* operator new(size_t size, std::align_val_t);
|
||||
[[nodiscard]] void* operator new(size_t size, std::align_val_t, const std::nothrow_t&) noexcept;
|
||||
[[nodiscard]] void* operator new(size_t size, std::align_val_t, std::nothrow_t const&) noexcept;
|
||||
|
||||
void operator delete(void* ptr) noexcept DISALLOW("All deletes in the kernel should have a known size.");
|
||||
void operator delete(void* ptr, size_t) noexcept;
|
||||
|
@ -66,7 +66,7 @@ void operator delete(void* ptr, std::align_val_t) noexcept DISALLOW("All deletes
|
|||
void operator delete(void* ptr, size_t, std::align_val_t) noexcept;
|
||||
|
||||
[[nodiscard]] void* operator new[](size_t size);
|
||||
[[nodiscard]] void* operator new[](size_t size, const std::nothrow_t&) noexcept;
|
||||
[[nodiscard]] void* operator new[](size_t size, std::nothrow_t const&) noexcept;
|
||||
|
||||
void operator delete[](void* ptrs) noexcept DISALLOW("All deletes in the kernel should have a known size.");
|
||||
void operator delete[](void* ptr, size_t) noexcept;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue