mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
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:
parent
c7e4c0734b
commit
044b4cc090
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue