mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +00:00
Kernel: mark kmalloc with attributes
This commit is contained in:
parent
bbe2d4a2d9
commit
746f6ea36d
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,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; }
|
||||
|
||||
ALWAYS_INLINE void* kmalloc(size_t size)
|
||||
[[gnu::malloc, gnu::returns_nonnull, gnu::alloc_size(1)]] ALWAYS_INLINE void* kmalloc(size_t size)
|
||||
{
|
||||
#ifdef KMALLOC_DEBUG_LARGE_ALLOCATIONS
|
||||
// Any kernel allocation >= 1M is 99.9% a bug.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue