os/mm/
mod.rs

1mod address;
2mod frame_allocator;
3mod heap_allocator;
4mod memory_set;
5mod page_table;
6
7use address::VPNRange;
8pub use address::{PhysAddr, PhysPageNum, StepByOne, VirtAddr, VirtPageNum};
9pub use frame_allocator::{FrameTracker, frame_alloc, frame_dealloc};
10pub use memory_set::remap_test;
11pub use memory_set::{KERNEL_SPACE, MapPermission, MemorySet, kernel_token};
12use page_table::PTEFlags;
13pub use page_table::{
14    PageTable, PageTableEntry, UserBuffer, translated_byte_buffer, translated_ref,
15    translated_refmut, translated_str,
16};
17
18pub fn init() {
19    heap_allocator::init_heap();
20    frame_allocator::init_frame_allocator();
21    KERNEL_SPACE.exclusive_access().activate();
22}