Skip to main content

start_guard

Function start_guard 

Source
pub fn start_guard(eviction_callback: Arc<dyn Fn(PressureLevel) + Send + Sync>)
Expand description

Start the background memory guardian task (idempotent). Polls every 3s (normal), 1s (under pressure), or up to 15s once RSS has been stably calm (idle backoff). At Critical level, performs aggressive eviction and signals background tasks to abort — never exits the process.