gtopt/memory_monitor.hpp file

System and process memory monitoring.

Provides real-time memory monitoring capabilities:

  • System-wide memory utilization from /proc/meminfo
  • Process RSS from /proc/self/status
  • Thread-safe atomic reads for lock-free access
  • RAII lifecycle with std::jthread

Namespaces

namespace gtopt

Classes

class gtopt::MemoryMonitor
struct gtopt::MemorySnapshot
Snapshot of memory state at a point in time.