Skip to main content

charge_task_silo_memory

Function charge_task_silo_memory 

Source
fn charge_task_silo_memory(
    task_id: TaskId,
    bytes: u64,
) -> Result<(), SyscallError>
Expand description

Charge memory usage against a task’s silo quota (if any).

Uses try_lock: callers sit on memory-mapping paths that can execute while SILO_MANAGER is held elsewhere on the same CPU (e.g. a snapshot helper allocating under the lock). A blocking acquisition there would self-deadlock the kernel; skipping accounting under contention is the documented best-effort trade-off (same policy as try_silo_id_for_task).