Expand description
Memory management and guardrails for preventing OOM conditions.
This module provides memory tracking and enforcement across different platforms, with configurable soft and hard limits, automatic GC hints, and graceful degradation.
Structs§
- Memory
Guard - Thread-safe memory guard for monitoring and enforcing memory limits.
- Memory
Guard Config - Memory guard configuration.
- Memory
Limit Exceeded - Memory limit exceeded error.
- Memory
Stats - Memory usage statistics.
Functions§
- check_
sufficient_ memory - Check if there’s enough memory for the planned generation.
- estimate_
memory_ mb - Estimate memory needed for generating N journal entries.
- get_
memory_ usage_ mb - Get current process memory usage in MB (Linux implementation).