mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 16:10:20 +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
Notes:
sideshowbarker
2024-07-19 04:26:20 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/044b4cc0906
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…
Reference in a new issue