pagers-core 0.1.6

Core library for page cache diagnostics and control on Linux and macOS
Documentation
1
2
3
4
5
6
7
8
9
10
use std::sync::LazyLock;

pub static PAGE_SIZE: LazyLock<usize> = LazyLock::new(|| {
    usize::try_from(
        nix::unistd::sysconf(nix::unistd::SysconfVar::PAGE_SIZE)
            .expect("Failed to fetch _SC_PAGESIZE")
            .expect("_SC_PAGESIZE returned None"),
    )
    .unwrap()
});