mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
Kernel: kmalloc_eternal should align pointers
This commit is contained in:
parent
1aed61964a
commit
656ffe36f2
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue