LibC: Flatten malloc() and free()

This allows UE to ignore the full range of these functions instead of
just the malloc() and free() bodies.
This commit is contained in:
Andreas Kling 2020-07-31 20:55:46 +02:00
parent c7e4c0734b
commit 044b4cc090
Notes: sideshowbarker 2024-07-19 04:26:20 +09:00

View file

@ -385,7 +385,7 @@ static void free_impl(void* ptr)
}
}
void* malloc(size_t size)
[[gnu::flatten]] void* malloc(size_t size)
{
void* ptr = malloc_impl(size);
if (s_profiling)
@ -393,7 +393,7 @@ void* malloc(size_t size)
return ptr;
}
void free(void* ptr)
[[gnu::flatten]] void free(void* ptr)
{
if (s_profiling)
perf_event(PERF_EVENT_FREE, reinterpret_cast<FlatPtr>(ptr), 0);