diff --git a/kernel/kernel/kmalloc.cpp b/kernel/kernel/kmalloc.cpp index 9ff7b129f2..ac85a1810c 100644 --- a/kernel/kernel/kmalloc.cpp +++ b/kernel/kernel/kmalloc.cpp @@ -304,6 +304,8 @@ void* kmalloc(size_t size, size_t align) return nullptr; ASSERT(is_power_of_two(align)); + if (align < s_kmalloc_min_align) + align = s_kmalloc_min_align; Kernel::CriticalScope critical;