Allow pml4 entries to be deallocated

parent 599cf038
......@@ -191,11 +191,10 @@ impl Mapper {
}
if let Some(p3_frame) = p4[page.p4_index()].pointed_frame() {
//TODO: Find out why this breaks user heap
//println!("Free p3 {:?}", p3_frame);
//p4.decrement_entry_count();
//p4[page.p4_index()].set_unused();
//deallocate_frames(p3_frame, 1);
p4.decrement_entry_count();
p4[page.p4_index()].set_unused();
deallocate_frames(p3_frame, 1);
} else {
panic!("unmap_inner({:X}): p3_frame not found", page.start_address().get());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment