mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:47:35 +00: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);
|
void* ptr = malloc_impl(size);
|
||||||
if (s_profiling)
|
if (s_profiling)
|
||||||
|
@ -393,7 +393,7 @@ void* malloc(size_t size)
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void free(void* ptr)
|
[[gnu::flatten]] void free(void* ptr)
|
||||||
{
|
{
|
||||||
if (s_profiling)
|
if (s_profiling)
|
||||||
perf_event(PERF_EVENT_FREE, reinterpret_cast<FlatPtr>(ptr), 0);
|
perf_event(PERF_EVENT_FREE, reinterpret_cast<FlatPtr>(ptr), 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue