fn free_list_remove(&mut self, order: usize, block: *mut u8) -> bool {
        let block_ptr = block as *mut FreeBlock;

        // Yuck, list traversals are gross without recursion.  Here,
        // `*checking` is the pointer we want to check, and `checking` is
        // the memory location we found it at, which we'll need if we want
        // to replace the value `*checking` with a new value.
        let mut checking: &mut *mut FreeBlock = &mut self.free_lists[order];

        // Loop until we run out of free blocks.
        while !(*checking).is_null() {
            // Is this the pointer we want to remove from the free list?
            if *checking == block_ptr {
                // Yup, this is the one, so overwrite the value we used to
                // get here with the next one in the sequence.
                *checking = unsafe { (*(*checking)).next };
                return true;
            }

            // Haven't found it yet, so point `checking` at the address
            // containing our `next` field.  (Once again, this is so we'll
            // be able to reach back and overwrite it later if necessary.)
            checking = unsafe { &mut ((*(*checking)).next) };
        }
        false
    }
/// Attempt to remove a block from our free list, returning true
/// success, and false if the block wasn't on our free list.  This is
/// the slowest part of a primitive buddy allocator, because it runs in
/// O(log N) time where N is the number of blocks of a given size.
///
/// We could perhaps improve this by keeping our free lists sorted,
/// because then "nursery generation" allocations would probably tend
/// to occur at lower addresses and then be faster to find / rule out
/// finding.
Attempt to remove a block from our free list, returning true
success, and false if the block wasn't on our free list.  This is
the slowest part of a primitive buddy allocator, because it runs in
O(log N) time where N is the number of blocks of a given size.

We could perhaps improve this by keeping our free lists sorted,
because then "nursery generation" allocations would probably tend
to occur at lower addresses and then be faster to find / rule out
finding.
Attempt to remove a block from our free list returning true success and false if the block wasn ' t on our free list . This is the slowest part of a primitive buddy allocator because it runs in O ( log N ) time where N is the number of blocks of a given size . We could perhaps improve this by keeping our free lists sorted because then " nursery generation " allocations would probably tend to occur at lower addresses and then be faster to find / rule out finding .
fn free_list_remove(&mut self, order: usize, block: *mut u8) -> bool {
        let block_ptr = block as *mut FreeBlock;
        // Yuck, list traversals are gross without recursion.  Here,
        // `*checking` is the pointer we want to check, and `checking` is
        // the memory location we found it at, which we'll need if we want
        // to replace the value `*checking` with a new value.
        let mut checking: &mut *mut FreeBlock = &mut self.free_lists[order];
        // Loop until we run out of free blocks.
        while !(*checking).is_null() {
            // Is this the pointer we want to remove from the free list?
            if *checking == block_ptr {
                // Yup, this is the one, so overwrite the value we used to
                // get here with the next one in the sequence.
                *checking = unsafe { (*(*checking)).next };
                return true;
            }
            // Haven't found it yet, so point `checking` at the address
            // containing our `next` field.  (Once again, this is so we'll
            // be able to reach back and overwrite it later if necessary.)
            checking = unsafe { &mut ((*(*checking)).next) };
        }
        false
    }
fn free_list_remove ( & mut self , order : usize , block : * mut u8 ) -> bool { let block_ptr = block as * mut FreeBlock ; // Yuck, list traversals are gross without recursion.  Here, // `*checking` is the pointer we want to check, and `checking` is // the memory location we found it at, which we'll need if we want // to replace the value `*checking` with a new value. let mut checking : & mut * mut FreeBlock = & mut self . free_lists [ order ] ; // Loop until we run out of free blocks. while ! ( * checking ) . is_null ( ) { // Is this the pointer we want to remove from the free list? if * checking == block_ptr { // Yup, this is the one, so overwrite the value we used to // get here with the next one in the sequence. * checking = unsafe { ( * ( * checking ) ) . next } ; return true ; } // Haven't found it yet, so point `checking` at the address // containing our `next` field.  (Once again, this is so we'll // be able to reach back and overwrite it later if necessary.) checking = unsafe { & mut ( ( * ( * checking ) ) . next ) } ; } false }
Attempt to remove a block from our free list, returning true
success, and false if the block wasn't on our free list.
Attempt to remove a block from our free list returning true success and false if the block wasn ' t on our free list .
&mut self
order
usize
block
*mut u8
&mut self
order
usize
block
*mut u8