fn free_list_pop(&mut self, order: usize) -> Option<*mut u8> {
        let candidate = self.free_lists[order];
        if !candidate.is_null() {
            // N.B: If this is the entry corresponding to the entire heap,
            // the next entry is always going to be NULL. Special-case it here
            // to allow for uninitialized initial data.
            if order != self.free_lists.len() - 1 {
                self.free_lists[order] = unsafe { (*candidate).next };
            } else {
                self.free_lists[order] = ptr::null_mut();
            }

            Some(candidate as *mut u8)
        } else {
            None
        }
    }
/// Pop a block off the appropriate free list.
Pop a block off the appropriate free list.
Pop a block off the appropriate free list .
fn free_list_pop(&mut self, order: usize) -> Option<*mut u8> {
        let candidate = self.free_lists[order];
        if !candidate.is_null() {
            // N.B: If this is the entry corresponding to the entire heap,
            // the next entry is always going to be NULL. Special-case it here
            // to allow for uninitialized initial data.
            if order != self.free_lists.len() - 1 {
                self.free_lists[order] = unsafe { (*candidate).next };
            } else {
                self.free_lists[order] = ptr::null_mut();
            }
            Some(candidate as *mut u8)
        } else {
            None
        }
    }
fn free_list_pop ( & mut self , order : usize ) -> Option < * mut u8 > { let candidate = self . free_lists [ order ] ; if ! candidate . is_null ( ) { // N.B: If this is the entry corresponding to the entire heap, // the next entry is always going to be NULL. Special-case it here // to allow for uninitialized initial data. if order != self . free_lists . len ( ) - 1 { self . free_lists [ order ] = unsafe { ( * candidate ) . next } ; } else { self . free_lists [ order ] = ptr :: null_mut ( ) ; } Some ( candidate as * mut u8 ) } else { None } }
Pop a block off the appropriate free list.
Pop a block off the appropriate free list .
&mut self
order
usize
&mut self
order
usize