fn mark_filled_chunks_as_free(&mut self) {
        // Find the last "filled chunk"
        let mut last_filled = ChunkPtr::null();
        let mut this_filled = self.filled_chunks;
        while !this_filled.is_null() {
            last_filled = this_filled;
            this_filled = this_filled.get_next_chunk();
        }
        if last_filled.is_null() {
            // Nothing to move
            return;
        }

        // Update its next pointer.
        last_filled.set_next_chunk(self.free_chunks);
        self.free_chunks = self.filled_chunks;
        self.filled_chunks = ChunkPtr::null();
    }
/// Mark the currently filled chunks as free!
Mark the currently filled chunks as free!
Mark the currently filled chunks as free!
fn mark_filled_chunks_as_free(&mut self) {
        // Find the last "filled chunk"
        let mut last_filled = ChunkPtr::null();
        let mut this_filled = self.filled_chunks;
        while !this_filled.is_null() {
            last_filled = this_filled;
            this_filled = this_filled.get_next_chunk();
        }
        if last_filled.is_null() {
            // Nothing to move
            return;
        }
        // Update its next pointer.
        last_filled.set_next_chunk(self.free_chunks);
        self.free_chunks = self.filled_chunks;
        self.filled_chunks = ChunkPtr::null();
    }
fn mark_filled_chunks_as_free ( & mut self ) { // Find the last "filled chunk" let mut last_filled = ChunkPtr :: null ( ) ; let mut this_filled = self . filled_chunks ; while ! this_filled . is_null ( ) { last_filled = this_filled ; this_filled = this_filled . get_next_chunk ( ) ; } if last_filled . is_null ( ) { // Nothing to move return ; } // Update its next pointer. last_filled . set_next_chunk ( self . free_chunks ) ; self . free_chunks = self . filled_chunks ; self . filled_chunks = ChunkPtr :: null ( ) ; }
Mark the currently filled chunks as free!
Mark the currently filled chunks as free!
&mut self
&mut self