fn offset_to_ptr_and_map(&mut self, order: usize, offset: usize) -> *mut u8 {
        let addr = self.offset_to_addr(offset);
        let size = PAGE_SIZE << order;
        let flags =
            EntryFlags::PRESENT | EntryFlags::WRITABLE | EntryFlags::NX | EntryFlags::GLOBAL;

        if unlikely(
            self.get_active_mapping()
                .map_range(addr, size, flags)
                .is_err(),
        ) {
            self.tree.dealloc(order, offset);
            null_mut()
        } else {
            addr.as_mut()
        }
    }
/// Converts an offset to a pointer and map the area.
Converts an offset to a pointer and map the area.
Converts an offset to a pointer and map the area .
fn offset_to_ptr_and_map(&mut self, order: usize, offset: usize) -> *mut u8 {
        let addr = self.offset_to_addr(offset);
        let size = PAGE_SIZE << order;
        let flags =
            EntryFlags::PRESENT | EntryFlags::WRITABLE | EntryFlags::NX | EntryFlags::GLOBAL;
        if unlikely(
            self.get_active_mapping()
                .map_range(addr, size, flags)
                .is_err(),
        ) {
            self.tree.dealloc(order, offset);
            null_mut()
        } else {
            addr.as_mut()
        }
    }
fn offset_to_ptr_and_map ( & mut self , order : usize , offset : usize ) -> * mut u8 { let addr = self . offset_to_addr ( offset ) ; let size = PAGE_SIZE << order ; let flags = EntryFlags :: PRESENT | EntryFlags :: WRITABLE | EntryFlags :: NX | EntryFlags :: GLOBAL ; if unlikely ( self . get_active_mapping ( ) . map_range ( addr , size , flags ) . is_err ( ) , ) { self . tree . dealloc ( order , offset ) ; null_mut ( ) } else { addr . as_mut ( ) } }
Converts an offset to a pointer and map the area.
Converts an offset to a pointer and map the area .
&mut self
order
usize
offset
usize
&mut self
order
usize
offset
usize