fn align_up(addr: u64, align: u64) -> usize {
    assert!(align.is_power_of_two(), "`align` must be a power of two");
    let align_mask = align - 1;
    if addr & align_mask == 0 {
        addr as usize // already aligned
    } else {
        ((addr | align_mask) + 1) as usize
    }
}
/// Align address upwards. Taken from x86_64 crate:
/// https://docs.rs/x86_64/latest/x86_64/fn.align_up.html
///
/// Returns the smallest x with alignment `align` so that x >= addr. The alignment must be
/// a power of 2.
Align address upwards.

Returns the smallest x with alignment `align` so that x >= addr. The alignment must be
a power of 2.
Align address upwards . Returns the smallest x with alignment ` align ` so that x > = addr . The alignment must be a power of 2 .
fn align_up(addr: u64, align: u64) -> usize {
    assert!(align.is_power_of_two(), "`align` must be a power of two");
    let align_mask = align - 1;
    if addr & align_mask == 0 {
        addr as usize // already aligned
    } else {
        ((addr | align_mask) + 1) as usize
    }
}
fn align_up ( addr : u64 , align : u64 ) -> usize { assert ! ( align is_power_of_two ( ) " " ) ; let align_mask = align - 1 ; if addr & align_mask == 0 { addr as usize // already aligned } else { ( ( addr | align_mask ) + 1 ) as usize } }
Align address upwards.
Align address upwards .
addr
u64
align
u64
addr
u64
align
u64