scalo 2.10.4

Self-regulating runtime for hyperscale-grade data-plane services. Config, logging and metrics come pre-wired as singletons you just use -- then CLI, health probes, transport, backpressure, adaptive scaling and deployment contracts all build on that integration. Batteries included, idiomatic Rust. Sibling to the scalo package on PyPI (scalo-py).
Documentation
// Project:   scalo
// File:      src/memory/mod.rs
// Purpose:   Memory management and OOM prevention
// Language:  Rust
//
// License:   Apache-2.0
// Copyright: (c) 2026 HYPERI PTY LIMITED

//! Memory management and OOM prevention.
//!
//! Provides cgroup-aware memory tracking with backpressure signals
//! for Kubernetes-deployed services. Prevents OOM-kills by applying
//! backpressure before hitting the container memory limit.
//!
//! # Architecture
//!
//! ```text
//! Layer 1 (opt-in): Cap allocator -- hard limit, last-resort crash instead of OOM-kill
//! Layer 2 (default): MemoryGuard -- cgroup-aware tracking, backpressure signals
//! ```

pub mod cgroup;
pub mod guard;

pub use cgroup::{
    detect_memory_high, detect_memory_limit, detect_memory_pressure, detect_memory_stall,
};
pub use guard::{MemoryGuard, MemoryGuardConfig, MemoryPressure, set_heap_source};