Function memory_addr::align_offset

source ·
pub const fn align_offset(addr: usize, align: usize) -> usize
Expand description

Returns the offset of the address within the alignment.

Equivalent to addr % align, but the alignment must be a power of two.