Module memory

Source
Expand description

Memory utilization check (virtual memory reservation and RAM usage) Manages memory monitoring and allocator configuration checks for the application.

This module provides a Memory struct designed to run as a dedicated thread. It monitors the application’s memory footprint over time and issues a warning if thresholds are exceeded.

Its primary responsibilities are:

  1. Pre-flight checks: Check validity of configuration and environment variables.
  2. Resident memory monitoring: It periodically checks the process’s resident memory, as informed by the allocator - conditionally compiled for feature ‘jemalloc’.
  3. **Allocated memory monitoring **: It also checks the allocated memory, as informed by the allocator - conditionally compiled for feature ‘jemalloc’.

The monitoring loop is controlled via channels and can be terminated cleanly on application shutdown.

Structs§

Memory
The main struct for the memory monitoring thread.

Constants§

CYCLE_TIME_HEATING_MEMORY 🔒