Expand description
Process resource-limit utilities.
The helpers query soft and hard limits and raise selected soft limits when supported. Platform-specific implementations provide neutral fallbacks when an interface is unavailable.
Re-exportsΒ§
use std::fs::read_to_string;πuse std::path::Path;πuse std::path::PathBuf;πuse nix::sys::resource::Resource;πuse nix::sys::resource::getrlimit;πuse nix::unistd::SysconfVar;πuse nix::unistd::sysconf;πuse crate::Result;πuse crate::utils::result::FlatOk;πuse crate::apply;πuse crate::debug;πuse crate::debug;πuse crate::utils::math::ExpectInto;π
FunctionsΒ§
- cgroup_
max_ tasks - Returns the cgroup task-count limit applying to this process.
- max_
file_ descriptors - Returns the soft and hard file-descriptor limits.
- max_
memory_ locked - Returns the soft and hard locked-memory limits.
- max_
stack_ size - Returns the soft and hard process stack-size limits.
- max_
threads - Returns the soft and hard per-user process-count limits.
- maximize_
fd_ limit - Raises the soft file descriptor limit to the current hard limit.
- maximize_
thread_ limit - Raises the soft thread limit to the current hard limit.
- page_
size - Get the systemβs page size in bytes.
- pids_
max π - Reads one cgroup
pids.maxfile.