Skip to content

Commit

Permalink
Kernel: kmalloc_eternal should align pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuta authored and awesomekling committed Nov 1, 2020
1 parent 1aed619 commit 656ffe3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Kernel/Heap/kmalloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 656ffe3

Please sign in to comment.