all: split reusable components into workspace crates
This commit is contained in:
parent
2a079ed800
commit
657e7ce2f7
225 changed files with 7422 additions and 17602 deletions
8
utils/src/page_size.rs
Normal file
8
utils/src/page_size.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
use {std::sync::LazyLock, uapi::c};
|
||||
|
||||
static PAGE_SIZE: LazyLock<usize> =
|
||||
LazyLock::new(|| uapi::sysconf(c::_SC_PAGESIZE).unwrap_or(4096) as _);
|
||||
|
||||
pub fn page_size() -> usize {
|
||||
*PAGE_SIZE
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue