MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / free_user_pagetables

Function free_user_pagetables

kernel/src/memory.rs:693–700  ·  view source on GitHub ↗

Free all user-accessible pages and the page table frames Note: Must not be called to free the current page tables Switch to kernel pagetable before calling

(level_4_physaddr: u64)

Source from the content-addressed store, hash-verified

691/// Note: Must not be called to free the current page tables
692/// Switch to kernel pagetable before calling
693pub fn free_user_pagetables(level_4_physaddr: u64) {
694 let memory_info = unsafe {MEMORY_INFO.as_mut().unwrap()};
695
696 free_pages_rec(memory_info.physical_memory_offset,
697 &mut memory_info.frame_allocator,
698 PhysAddr::new(level_4_physaddr),
699 4);
700}
701
702///////////////////////////////////////////////////////////////////////
703

Callers 1

dropMethod · 0.85

Calls 1

free_pages_recFunction · 0.85

Tested by

no test coverage detected