Skip to content

Commit 889c6fb

Browse files
vmalloc: align up size to PAGE_SIZE
Signed-off-by: Andy-Python-Programmer <[email protected]>
1 parent f72ba13 commit 889c6fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/aero_kernel/src/mem/alloc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ impl Allocator {
152152
if let Some(slab) = slab {
153153
slab.alloc()
154154
} else {
155-
let size = align_up(layout.size() as _, layout.align() as _) / Size4KiB::SIZE;
155+
let size = align_up(layout.size() as _, Size4KiB::SIZE) / Size4KiB::SIZE;
156156

157157
vmalloc::get_vmalloc()
158158
.alloc(size as usize)

0 commit comments

Comments
 (0)