Skip to content
Permalink
Browse files

Fix heap allocation test: memory::init expects a VirtAddr now

  • Loading branch information...
phil-opp committed Sep 15, 2019
1 parent d4d853c commit 7a9818aeaf7e4efe58b819ec658e9bc5fc62a161
Showing with 2 additions and 1 deletion.
  1. +2 −1 blog/content/second-edition/posts/10-heap-allocation/index.md
@@ -680,7 +680,8 @@ fn main(boot_info: &'static BootInfo) -> ! {
use blog_os::memory::{self, BootInfoFrameAllocator};
blog_os::init();
let mut mapper = unsafe { memory::init(boot_info.physical_memory_offset) };
let phys_mem_offset = VirtAddr::new(boot_info.physical_memory_offset);
let mut mapper = unsafe { memory::init(phys_mem_offset) };
let mut frame_allocator = unsafe {
BootInfoFrameAllocator::init(&boot_info.memory_map)
};

0 comments on commit 7a9818a

Please sign in to comment.
You can’t perform that action at this time.