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

AK: Add ALWAYS_INLINE, NEVER_INLINE and FLATTEN macros

It's tedious to write (and look at) [[gnu::always_inline]] etc. :^)
This commit is contained in:
Andreas Kling 2020-04-30 11:43:25 +02:00
parent f1a8fb1e88
commit 888e35f0fe
14 changed files with 63 additions and 56 deletions

View file

@ -53,7 +53,7 @@ extern bool g_dump_kmalloc_stacks;
inline void* operator new(size_t, void* p) { return p; }
inline void* operator new[](size_t, void* p) { return p; }
[[gnu::always_inline]] inline void* kmalloc(size_t size)
ALWAYS_INLINE void* kmalloc(size_t size)
{
#ifdef KMALLOC_DEBUG_LARGE_ALLOCATIONS
// Any kernel allocation >= 1M is 99.9% a bug.