Run rustfmt

This commit is contained in:
Philipp Oppermann
2015-12-20 15:05:08 +01:00
parent 52f239e5b4
commit 165e6ebff8
4 changed files with 66 additions and 47 deletions

View File

@@ -139,9 +139,9 @@ impl RecursivePageTable {
.expect("mapping code does not support huge pages");
let frame = p1[page.p1_index()].pointed_frame().unwrap();
p1[page.p1_index()].set_unused();
unsafe { ::x86::tlb::flush(page.start_address() )};
unsafe { ::x86::tlb::flush(page.start_address()) };
// TODO free p(1,2,3) table if empty
//allocator.deallocate_frame(frame);
// allocator.deallocate_frame(frame);
}
}
@@ -170,9 +170,8 @@ pub fn test_paging<A>(allocator: &mut A)
println!("next free frame: {:?}", allocator.allocate_frame());
// test unmap
println!("{:#x}", unsafe {
*(Page::containing_address(addr).start_address() as *const u64)
});
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));
}