pub struct MachIPCConfig {
pub num_ports: usize,
pub ool_size: usize,
pub use_complex_messages: bool,
}Expand description
Configuration for Mach IPC entropy collection.
§Example
let config = MachIPCConfig {
num_ports: 16, // more ports = more contention
ool_size: 8192, // larger OOL = more VM work
use_complex_messages: true, // OOL messages (recommended)
};Fields§
§num_ports: usizeNumber of Mach ports to round-robin across.
More ports create more namespace contention (splay tree operations) and varied queue depths. Each port is allocated with both receive and send rights.
Range: 1-64 (clamped to ≥1). Default: 8
ool_size: usizeSize of out-of-line (OOL) memory descriptors in bytes.
OOL descriptors force the kernel to perform vm_map_copyin/copyout
operations, exercising page table updates and physical page allocation.
Larger sizes mean more VM work per message.
Range: 1-65536. Default: 4096 (one page)
use_complex_messages: boolUse complex messages with OOL descriptors (true) or simple port
allocate/deallocate (false, legacy behavior).
Complex messages traverse deeper kernel paths and produce significantly higher timing variance than simple port operations.
Default: true
Trait Implementations§
Source§impl Clone for MachIPCConfig
impl Clone for MachIPCConfig
Source§fn clone(&self) -> MachIPCConfig
fn clone(&self) -> MachIPCConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more