mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Add unmap assertion
This commit is contained in:
@@ -60,7 +60,7 @@ pub fn map_to<A>(lock: &mut Lock, page: Page, frame: Frame, writable: bool,
|
||||
}
|
||||
|
||||
pub fn unmap<A>(lock: &mut Lock, page: Page, allocator: &mut A) where A: FrameAllocator {
|
||||
// TODO assertions
|
||||
assert!(!page.is_unused());
|
||||
let p1_field = page.p1_page().field(page.p1_index());
|
||||
let frame = p1_field.pointed_frame();
|
||||
p1_field.set_unused();
|
||||
|
||||
Reference in New Issue
Block a user