mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
0376c127f6
commit
086969277e
Notes:
sideshowbarker
2024-07-17 16:21:09 +09:00
Author: https://github.com/IdanHo
Commit: 086969277e
Pull-request: https://github.com/SerenityOS/serenity/pull/12321
Reviewed-by: https://github.com/BertalanD
Reviewed-by: https://github.com/bgianfo ✅
1665 changed files with 8479 additions and 8479 deletions
|
@ -56,25 +56,25 @@ static bool s_scrub_free = true;
|
|||
static bool s_profiling = false;
|
||||
static bool s_in_userspace_emulator = false;
|
||||
|
||||
ALWAYS_INLINE static void ue_notify_malloc(const void* ptr, size_t size)
|
||||
ALWAYS_INLINE static void ue_notify_malloc(void const* ptr, size_t size)
|
||||
{
|
||||
if (s_in_userspace_emulator)
|
||||
syscall(SC_emuctl, 1, size, (FlatPtr)ptr);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE static void ue_notify_free(const void* ptr)
|
||||
ALWAYS_INLINE static void ue_notify_free(void const* ptr)
|
||||
{
|
||||
if (s_in_userspace_emulator)
|
||||
syscall(SC_emuctl, 2, (FlatPtr)ptr, 0);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE static void ue_notify_realloc(const void* ptr, size_t size)
|
||||
ALWAYS_INLINE static void ue_notify_realloc(void const* ptr, size_t size)
|
||||
{
|
||||
if (s_in_userspace_emulator)
|
||||
syscall(SC_emuctl, 3, size, (FlatPtr)ptr);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE static void ue_notify_chunk_size_changed(const void* block, size_t chunk_size)
|
||||
ALWAYS_INLINE static void ue_notify_chunk_size_changed(void const* block, size_t chunk_size)
|
||||
{
|
||||
if (s_in_userspace_emulator)
|
||||
syscall(SC_emuctl, 4, chunk_size, (FlatPtr)block);
|
||||
|
@ -176,7 +176,7 @@ static BigAllocator* big_allocator_for_size(size_t size)
|
|||
|
||||
extern "C" {
|
||||
|
||||
static void* os_alloc(size_t size, const char* name)
|
||||
static void* os_alloc(size_t size, char const* name)
|
||||
{
|
||||
int flags = MAP_ANONYMOUS | MAP_PRIVATE | MAP_PURGEABLE;
|
||||
#if ARCH(X86_64)
|
||||
|
@ -525,7 +525,7 @@ size_t malloc_size(void const* ptr)
|
|||
if (!ptr)
|
||||
return 0;
|
||||
void* page_base = (void*)((FlatPtr)ptr & ChunkedBlock::block_mask);
|
||||
auto* header = (const CommonHeader*)page_base;
|
||||
auto* header = (CommonHeader const*)page_base;
|
||||
auto size = header->m_size;
|
||||
if (header->m_magic == MAGIC_BIGALLOC_HEADER)
|
||||
size -= sizeof(BigAllocationBlock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue