Expand description
Utilities to limit memory usage.
In the context of this module, “memory” refers to the sum of physical memory and swap space . Other parts of the code usually don’t include swap space when talking about “memory”.
Structs§
- Limiter 🔒
- A handle to a running memory limiter task.
- Limiter
Config 🔒 - Configuration for an memory limiter task.
- Limiter
Metrics 🔒 - Limiter
Task 🔒 - A task that enforces configured memory limits.
- Proc
Status - Helper for reading and parsing
/proc/self/status
on Linux.
Statics§
- LIMITER 🔒
- A handle to the active memory limiter.
Functions§
- apply_
limiter_ config - Apply the given configuration to the active limiter.
- start_
limiter - Start the process-global memory limiter.