Kernel: allow kmalloc of size 0

This commit is contained in:
Bananymous 2024-02-07 22:36:24 +02:00
parent 2cc9534570
commit e26f360d93
1 changed files with 3 additions and 0 deletions

View File

@ -294,6 +294,9 @@ void* kmalloc(size_t size, size_t align, bool force_identity_map)
// currently kmalloc is always identity mapped
(void)force_identity_map;
if (size == 0)
size = 1;
const kmalloc_info& info = s_kmalloc_info;
ASSERT(is_power_of_two(align));