Kernel: kmalloc_eternal should align pointers

This commit is contained in:
Tom 2020-11-01 08:50:03 -07:00 committed by Andreas Kling
parent 1aed61964a
commit 656ffe36f2

View file

@ -199,6 +199,8 @@ void kmalloc_init()
void* kmalloc_eternal(size_t size)
{
size = round_up_to_power_of_two(size, sizeof(void*));
ScopedSpinLock lock(s_lock);
void* ptr = s_next_eternal_ptr;
s_next_eternal_ptr += size;