fn alloc_alignment() {
    info!("Allocating a structure with alignment to 0x100");

    #[repr(align(0x100))]
    struct Block([u8; 0x100]);

    let value = vec![Block([1; 0x100])];
    assert_eq!(value.as_ptr() as usize % 0x100, 0, "Wrong alignment");
}
// Simple test to ensure our custom allocator works with correct alignment.
Simple test to ensure our custom allocator works with correct alignment.
Simple test to ensure our custom allocator works with correct alignment .
fn alloc_alignment() {
    info!("Allocating a structure with alignment to 0x100");
    #[repr(align(0x100))]
    struct Block([u8; 0x100]);
    let value = vec![Block([1; 0x100])];
    assert_eq!(value.as_ptr() as usize % 0x100, 0, "Wrong alignment");
}
fn alloc_alignment ( ) { info ! ( " " ) ; # [ repr ( align ( 0x100 ) ) ] struct Block ( [ u8 ; 0x100 ] ) ; let value = vec ! [ Block ( [ 1 0x100 ] ) ] ; assert_eq ! ( value as_ptr ( ) as usize 0x100 0 " " ) ; }
Simple test to ensure our custom allocator works with correct alignment.
Simple test to ensure our custom allocator works with correct alignment .