diff --git a/src/memory/area_frame_allocator.rs b/src/memory/area_frame_allocator.rs index a0269ee..a13fcf5 100644 --- a/src/memory/area_frame_allocator.rs +++ b/src/memory/area_frame_allocator.rs @@ -50,7 +50,7 @@ impl FrameAllocator for AreaFrameAllocator { } fn deallocate_frame(&mut self, _frame: Frame) { - unimplemented!() + //unimplemented!() } } diff --git a/src/memory/paging/mod.rs b/src/memory/paging/mod.rs index b2f59ed..e45787e 100644 --- a/src/memory/paging/mod.rs +++ b/src/memory/paging/mod.rs @@ -167,4 +167,15 @@ pub fn test_paging(allocator: &mut A) page_table.map_to(page, frame, EntryFlags::empty(), allocator); println!("Some = {:?}", page_table.translate(addr)); println!("next free frame: {:?}", allocator.allocate_frame()); + + println!("{:#x}", unsafe { + *(Page::containing_address(addr).start_address() as *const u64) + }); + + page_table.unmap(Page::containing_address(addr), allocator); + println!("None = {:?}", page_table.translate(addr)); + + println!("{:#x}", unsafe { + *(Page::containing_address(addr).start_address() as *const u64) + }); }