mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 17:07:35 +00:00
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.
This commit is contained in:
parent
81571bdac9
commit
344ffda8cb
1 changed files with 1 additions and 1 deletions
|
@ -431,7 +431,7 @@ static void* kmalloc_impl(size_t size, size_t alignment, CallerWillInitializeMem
|
||||||
}
|
}
|
||||||
|
|
||||||
// Alignment must be a power of two.
|
// Alignment must be a power of two.
|
||||||
VERIFY(popcount(alignment) == 1);
|
VERIFY(is_power_of_two(alignment));
|
||||||
|
|
||||||
SpinlockLocker lock(s_lock);
|
SpinlockLocker lock(s_lock);
|
||||||
++g_kmalloc_call_count;
|
++g_kmalloc_call_count;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue