fn create_free_slab<'s>(
        &mut self,
        order: usize,
        start_offset: u32,
        slots_count: u32,
        obj_size: u32,
    ) -> Option<&'s mut Slab> {
        let offset = self.tree.alloc(order)?;
        let ptr = self.offset_to_ptr_and_map(order, offset);

        if unlikely(ptr.is_null()) {
            None
        } else {
            let slab = unsafe { &mut *(ptr as usize as *mut Slab) };
            slab.init(start_offset, slots_count, obj_size);
            Some(slab)
        }
    }
/// Creates a free slab of the requested order.
Creates a free slab of the requested order.
Creates a free slab of the requested order .
fn create_free_slab<'s>(
        &mut self,
        order: usize,
        start_offset: u32,
        slots_count: u32,
        obj_size: u32,
    ) -> Option<&'s mut Slab> {
        let offset = self.tree.alloc(order)?;
        let ptr = self.offset_to_ptr_and_map(order, offset);
        if unlikely(ptr.is_null()) {
            None
        } else {
            let slab = unsafe { &mut *(ptr as usize as *mut Slab) };
            slab.init(start_offset, slots_count, obj_size);
            Some(slab)
        }
    }
fn create_free_slab < ' s > ( & mut self , order : usize , start_offset : u32 , slots_count : u32 , obj_size : u32 , ) -> Option < & ' s mut Slab > { let offset = self . tree . alloc ( order ) ? ; let ptr = self . offset_to_ptr_and_map ( order , offset ) ; if unlikely ( ptr . is_null ( ) ) { None } else { let slab = unsafe { & mut * ( ptr as usize as * mut Slab ) } ; slab . init ( start_offset , slots_count , obj_size ) ; Some ( slab ) } }
Creates a free slab of the requested order.
Creates a free slab of the requested order .
&mut self
order
usize
start_offset
u32
slots_count
u32
obj_size
u32
&mut self
order
usize
start_offset
u32
slots_count
u32
obj_size
u32