1
0
Fork 0
forked from wry/wry

all: remove once_cell dependency

This commit is contained in:
Julian Orth 2026-03-30 12:30:26 +02:00
parent c50242562a
commit 41ef632a15
10 changed files with 34 additions and 32 deletions

View file

@ -1,6 +1,7 @@
use {once_cell::sync::Lazy, uapi::c};
use {std::sync::LazyLock, uapi::c};
static PAGE_SIZE: Lazy<usize> = Lazy::new(|| uapi::sysconf(c::_SC_PAGESIZE).unwrap_or(4096) as _);
static PAGE_SIZE: LazyLock<usize> =
LazyLock::new(|| uapi::sysconf(c::_SC_PAGESIZE).unwrap_or(4096) as _);
pub fn page_size() -> usize {
*PAGE_SIZE