2019-07-30 14:47:53 -07:00

4 lines
93 B
Rust

pub fn round_up_to_page_size(size: usize) -> usize {
(size + (4096 - 1)) & !(4096 - 1)
}