unsafe fn destroy_chunk(chunk: &Chunk) {
    let mut idx = 0;
    let buf = chunk.as_ptr();
    let fill = chunk.fill.get();

    while idx < fill {
        let tydesc_data: *const usize = mem::transmute(buf.offset(idx as isize));
        let (tydesc, is_done) = un_bitpack_tydesc_ptr(*tydesc_data);
        let (size, align) = ((*tydesc).size, (*tydesc).align);

        let after_tydesc = idx + mem::size_of::<*const TyDesc>();

        let start = round_up(after_tydesc, align);

        //debug!("freeing object: idx = {}, size = {}, align = {}, done = {}",
        //       start, size, align, is_done);
        if is_done {
            ((*tydesc).drop_glue)(buf.offset(start as isize) as *const i8);
        }

        // Find where the next tydesc lives
        idx = round_up(start + size, mem::align_of::<*const TyDesc>());
    }
}
// Walk down a chunk, running the destructors for any objects stored
// in it.
Walk down a chunk, running the destructors for any objects stored
in it.
Walk down a chunk running the destructors for any objects stored in it .
unsafe fn destroy_chunk(chunk: &Chunk) {
    let mut idx = 0;
    let buf = chunk.as_ptr();
    let fill = chunk.fill.get();
    while idx < fill {
        let tydesc_data: *const usize = mem::transmute(buf.offset(idx as isize));
        let (tydesc, is_done) = un_bitpack_tydesc_ptr(*tydesc_data);
        let (size, align) = ((*tydesc).size, (*tydesc).align);
        let after_tydesc = idx + mem::size_of::<*const TyDesc>();
        let start = round_up(after_tydesc, align);
        //debug!("freeing object: idx = {}, size = {}, align = {}, done = {}",
        //       start, size, align, is_done);
        if is_done {
            ((*tydesc).drop_glue)(buf.offset(start as isize) as *const i8);
        }
        // Find where the next tydesc lives
        idx = round_up(start + size, mem::align_of::<*const TyDesc>());
    }
}
unsafe fn destroy_chunk ( chunk : & Chunk ) { let mut idx = 0 ; let buf = chunk . as_ptr ( ) ; let fill = chunk . fill . get ( ) ; while idx < fill { let tydesc_data : * const usize = mem :: transmute ( buf . offset ( idx as isize ) ) ; let ( tydesc , is_done ) = un_bitpack_tydesc_ptr ( * tydesc_data ) ; let ( size , align ) = ( ( * tydesc ) . size , ( * tydesc ) . align ) ; let after_tydesc = idx + mem :: size_of :: < * const TyDesc > ( ) ; let start = round_up ( after_tydesc , align ) ; //debug!("freeing object: idx = {}, size = {}, align = {}, done = {}", //       start, size, align, is_done); if is_done { ( ( * tydesc ) . drop_glue ) ( buf . offset ( start as isize ) as * const i8 ) ; } // Find where the next tydesc lives idx = round_up ( start + size , mem :: align_of :: < * const TyDesc > ( ) ) ; } }
Walk down a chunk, running the destructors for any objects stored
in it.
Walk down a chunk running the destructors for any objects stored in it .
chunk
&Chunk