Skip to main content

offset

Function offset 

Source
pub fn offset(raw: usize, align: usize) -> usize
Expand description

How far into a padded block at address raw the pointer handed out is, for alignment align (a power of two above MIN_ALIGN).

The result is between MIN_ALIGN and align: the pointer is aligned, stays inside the padded block, and leaves room before it for the block’s address.