region_cached 1.0.1

Adds a logical layer of caching between processor L3 cache and main memory
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use many_cpus::HardwareInfo;

#[cfg_attr(test, mockall::automock)]
pub(crate) trait HardwareInfoClient {
    fn max_memory_region_count(&self) -> usize;
}

#[derive(Debug)]
pub(crate) struct HardwareInfoClientImpl;

impl HardwareInfoClient for HardwareInfoClientImpl {
    #[cfg_attr(test, mutants::skip)] // Trivial fn, tested on lower levels - skip mutating.
    fn max_memory_region_count(&self) -> usize {
        HardwareInfo::max_memory_region_count()
    }
}