From 496d040332ac3ca486679cd000677874fea8b61f Mon Sep 17 00:00:00 2001 From: Jonathan Klimt Date: Tue, 12 Nov 2024 18:21:38 +0100 Subject: [PATCH] Fixed invalid virtual address in kernel_heap_end --- src/arch/x86_64/mm/virtualmem.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/arch/x86_64/mm/virtualmem.rs b/src/arch/x86_64/mm/virtualmem.rs index a191a294ca..8535710f1c 100644 --- a/src/arch/x86_64/mm/virtualmem.rs +++ b/src/arch/x86_64/mm/virtualmem.rs @@ -27,7 +27,7 @@ pub fn init() { } else { PageRange::new( mm::kernel_end_address().as_usize(), - kernel_heap_end().as_usize(), + kernel_heap_end().as_usize() + 1, ) .unwrap() }; @@ -89,8 +89,8 @@ pub fn allocate_aligned(size: usize, align: usize) -> Result VirtAddr { - VirtAddr::new(0x8000_0000_0000u64) + VirtAddr::new(0x7FFF_FFFF_FFFFu64) } #[cfg(feature = "common-os")]