Skip to main content

align_to_cache_line

Function align_to_cache_line 

Source
pub const fn align_to_cache_line(size: usize) -> usize
Expand description

Round a size up to the next cache-line boundary.

Uses the transfer granularity, not the false-sharing separation: this answers “how many lines does this occupy”, not “how far apart must these live”.