sinf 0.1.0

Library for obtaining in-depth system information at both the hardware and software levels
Documentation
use super::*;

impl SystemInner {
    pub(crate) fn new() -> Result<Self, Error> {
        Ok(Self {
            process_list: HashMap::with_capacity(500),
            mem_total: 0,
            mem_available: 0,
            swap_total: 0,
            swap_used: 0,
            cpus: CpusWrapper::new(),
            query: None,
            #[cfg(feature = "gpu")]
            gpu_query: None,
        })
    }

    pub(crate) fn cgroup_limits(&self) -> Option<crate::CGroupLimits> {
        None
    }

    pub(crate) fn open_files_limit() -> Result<usize, Error> {
        // C runtime `_NHANDLE_` limit.
        Ok(8192)
    }
}