forked from Bananymous/banan-os
Kernel: kmalloc minimum align is forced to s_kmalloc_min_align
This commit is contained in:
parent
8940ff8002
commit
8dbece9119
|
@ -304,6 +304,8 @@ void* kmalloc(size_t size, size_t align)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
ASSERT(is_power_of_two(align));
|
ASSERT(is_power_of_two(align));
|
||||||
|
if (align < s_kmalloc_min_align)
|
||||||
|
align = s_kmalloc_min_align;
|
||||||
|
|
||||||
Kernel::CriticalScope critical;
|
Kernel::CriticalScope critical;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue