diff options
author | Timon Kruiper <timonkruiper@gmail.com> | 2022-12-20 15:42:48 +0100 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2022-12-21 08:35:14 +0000 |
commit | 344ffda8cb83b8a441d2a95eaf57c6eb813495b5 (patch) | |
tree | 180d21e8975a14181c5c44e555a7eab3c8b34403 | |
parent | 81571bdac9e959c9da71de55088b2d36ac4751fd (diff) | |
download | serenity-344ffda8cb83b8a441d2a95eaf57c6eb813495b5.zip |
Kernel: Use AK::is_power_of_two instead of AK::popcount in kmalloc_impl
AK::popcount will use floating-point instructions, which in the aarch64
kernel are not allowed, and will result in an exception.
-rw-r--r-- | Kernel/Heap/kmalloc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Heap/kmalloc.cpp b/Kernel/Heap/kmalloc.cpp index 57ed0dedc5..96f6d4fd35 100644 --- a/Kernel/Heap/kmalloc.cpp +++ b/Kernel/Heap/kmalloc.cpp @@ -431,7 +431,7 @@ static void* kmalloc_impl(size_t size, size_t alignment, CallerWillInitializeMem } // Alignment must be a power of two. - VERIFY(popcount(alignment) == 1); + VERIFY(is_power_of_two(alignment)); SpinlockLocker lock(s_lock); ++g_kmalloc_call_count; |