Skip to content

Commit

Permalink
align kernel space down to next page boundary
Browse files Browse the repository at this point in the history
- otherwise PageRange::new is able to return an error
  • Loading branch information
stlankes committed Dec 14, 2024
1 parent 226515b commit 54da131
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/arch/x86_64/mm/virtualmem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ pub fn init() {
} else {
PageRange::new(
mm::kernel_end_address().as_usize(),
kernel_heap_end().as_usize() + 1,
kernel_heap_end()
.as_usize()
.align_down(BasePageSize::SIZE as usize),
)
.unwrap()
};
Expand Down

0 comments on commit 54da131

Please sign in to comment.