Kernel: allow kmalloc of size 0
This commit is contained in:
parent
2cc9534570
commit
e26f360d93
|
@ -294,6 +294,9 @@ void* kmalloc(size_t size, size_t align, bool force_identity_map)
|
||||||
// currently kmalloc is always identity mapped
|
// currently kmalloc is always identity mapped
|
||||||
(void)force_identity_map;
|
(void)force_identity_map;
|
||||||
|
|
||||||
|
if (size == 0)
|
||||||
|
size = 1;
|
||||||
|
|
||||||
const kmalloc_info& info = s_kmalloc_info;
|
const kmalloc_info& info = s_kmalloc_info;
|
||||||
|
|
||||||
ASSERT(is_power_of_two(align));
|
ASSERT(is_power_of_two(align));
|
||||||
|
|
Loading…
Reference in New Issue