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

LibC: Don't flatten malloc and free

This is no longer needed as per the previous commit, UserspaceEmulator's
malloc tracer now correctly handles functions called from within
`malloc` and `free`. This might also have a benefit on performance
because forcibly inlining all function calls pessimizes cache locality.
This commit is contained in:
Daniel Bertalan 2021-08-14 16:56:55 +02:00 committed by Andreas Kling
parent 87ef2718bc
commit fbdf17ae68

View file

@ -410,7 +410,7 @@ static void free_impl(void* ptr)
}
}
[[gnu::flatten]] void* malloc(size_t size)
void* malloc(size_t size)
{
MemoryAuditingSuppressor suppressor;
void* ptr = malloc_impl(size, CallerWillInitializeMemory::No);
@ -419,7 +419,7 @@ static void free_impl(void* ptr)
return ptr;
}
[[gnu::flatten]] void free(void* ptr)
void free(void* ptr)
{
MemoryAuditingSuppressor suppressor;
if (s_profiling)