Skip to main content

align_size

Function align_size 

Source
pub fn align_size(size: usize, alignment: usize) -> usize
Expand description

Round size up to the next multiple of alignment.

Returns size unchanged when alignment is zero or not a power of two, since no meaningful rounding is defined in that case.