Expand description
This module contains logic to reason about memory usage, implement memory limits, and some helpers to attempt to release cached memory back to the system when memory is low.
Re-exports§
pub use tracking::set_tracking_callstacks;
pub use tracking::tracking_stats;
Modules§
Structs§
- Represents a constraint on memory usage
- Represents the current memory usage of this process
Enums§
Functions§
- Returns the amount of headroom; the number of bytes that can be allocated before we hit the soft limit
- Returns true when we are within 10% if the soft limit
- Indicates the overall memory status
- To be called when a thread goes idle; it will flush cached memory out of the thread local cache to be returned/reused elsewhere in the system
- Initialize the memory thread to monitor memory usage/limits
- Returns a receiver that will notify when memory status changes from OK -> !OK or vice versa.