diff --git a/blog/content/post/06-page-tables.md b/blog/content/post/06-page-tables.md index 3966d0a7..0d1dcaeb 100644 --- a/blog/content/post/06-page-tables.md +++ b/blog/content/post/06-page-tables.md @@ -855,14 +855,14 @@ x86_64 = "0.1.2" ```rust ... - p1[page.p1_index()].set_unused(); - unsafe { - use x86_64::instructions::tlb; - use x86_64::VirtualAddress; - tlb::flush(VirtualAddress(page.start_address())); - } - // TODO free p(1,2,3) table if empty - //allocator.deallocate_frame(frame); + p1[page.p1_index()].set_unused(); + + use x86_64::instructions::tlb; + use x86_64::VirtualAddress; + tlb::flush(VirtualAddress(page.start_address())); + + // TODO free p(1,2,3) table if empty + //allocator.deallocate_frame(frame); } ``` Now the desired page fault occurs even when we access the page before.