pub fn new_example_mapping(page: Page, mapper: &mut OffsetPageTable, framealloc: &mut impl FrameAllocator<Size4KiB>)
{
	use x86_64::structures::paging::PageTableFlags as Flags;
	let frame = PhysFrame::containing_address(PhysAddr::new(0xb8000));
	let flags = Flags::PRESENT | Flags::WRITABLE;
	let map_to_result = unsafe
	{
		mapper.map_to(page, frame, flags, framealloc)
	};
	map_to_result.expect("[ERR] MAP_TO FAILURE").flush();
}
// This creates an example mapping to frame 0xb8000.
This creates an example mapping to frame 0xb8000.
This creates an example mapping to frame 0xb8000 .
pub fn new_example_mapping(page: Page, mapper: &mut OffsetPageTable, framealloc: &mut impl FrameAllocator<Size4KiB>)
{
	use x86_64::structures::paging::PageTableFlags as Flags;
	let frame = PhysFrame::containing_address(PhysAddr::new(0xb8000));
	let flags = Flags::PRESENT | Flags::WRITABLE;
	let map_to_result = unsafe
	{
		mapper.map_to(page, frame, flags, framealloc)
	};
	map_to_result.expect("[ERR] MAP_TO FAILURE").flush();
}
pub fn new_example_mapping ( page : Page , mapper : & mut OffsetPageTable , framealloc : & mut impl FrameAllocator < Size4KiB > ) { use x86_64 :: structures :: paging :: PageTableFlags as Flags ; let frame = PhysFrame :: containing_address ( PhysAddr :: new ( 0xb8000 ) ) ; let flags = Flags :: PRESENT | Flags :: WRITABLE ; let map_to_result = unsafe { mapper . map_to ( page , frame , flags , framealloc ) } ; map_to_result . expect ( " " ) . flush ( ) ; }
This creates an example mapping to frame 0xb8000.
This creates an example mapping to frame 0xb8000 .
page
Page
mapper
&mut OffsetPageTable
framealloc
&mut impl FrameAllocator<Size4KiB>