[][src]Function sunrise_libutils::align_up

pub fn align_up<T: Num + Not<Output = T> + BitAnd<Output = T> + Copy>(
    addr: T,
    align: T
) -> T

Align the address to the next alignment.

The given number should be a power of two to get coherent results!

Panics

Panics on underflow if align is 0. Panics on overflow if the expression addr + (align - 1) overflows.