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