Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
Loading...
Searching...
No Matches
q3::ResidentMemorySample Struct Reference

#include <memory.hpp>

Static Public Member Functions

static std::string format_gibibytes (std::uint64_t bytes)
 
static ResidentMemorySample sample ()
 Platforms without a known source report nothing rather than guessing.
 
static double to_gibibytes (std::uint64_t bytes)
 

Public Attributes

std::uint64_t anonymous_bytes = 0
 Resident anonymous pages: heap and stack, what this process allocated.
 
bool available = false
 Whether any source could be read.
 
std::uint64_t current_bytes = 0
 Resident set size at the moment of sampling.
 
std::uint64_t malloc_in_use_bytes = 0
 Bytes the C allocator reports as handed out, where it can be asked.
 
std::uint64_t peak_bytes = 0
 High-water mark of the resident set over the life of the process.
 
std::uint64_t shared_bytes = 0
 Resident shared pages: mapped files and shared-memory segments.
 

Detailed Description

One reading of this process's resident memory, in bytes.

available is false when no source could be read; every field is then zero. Sampling never throws and never fails the run — a missing reading is worth less than a crashed calculation.

Definition at line 47 of file memory.hpp.

Member Function Documentation

◆ format_gibibytes()

std::string q3::ResidentMemorySample::format_gibibytes ( std::uint64_t  bytes)
inlinestatic

◆ sample()

ResidentMemorySample q3::ResidentMemorySample::sample ( )
inlinestatic

Platforms without a known source report nothing rather than guessing.

Definition at line 146 of file memory.hpp.

Referenced by q3::ProfilingCounters::record_resident_memory().

◆ to_gibibytes()

static double q3::ResidentMemorySample::to_gibibytes ( std::uint64_t  bytes)
inlinestatic

Definition at line 63 of file memory.hpp.

Referenced by format_gibibytes().

Member Data Documentation

◆ anonymous_bytes

std::uint64_t q3::ResidentMemorySample::anonymous_bytes = 0

Resident anonymous pages: heap and stack, what this process allocated.

Definition at line 53 of file memory.hpp.

◆ available

bool q3::ResidentMemorySample::available = false

◆ current_bytes

std::uint64_t q3::ResidentMemorySample::current_bytes = 0

◆ malloc_in_use_bytes

std::uint64_t q3::ResidentMemorySample::malloc_in_use_bytes = 0

Bytes the C allocator reports as handed out, where it can be asked.

Definition at line 57 of file memory.hpp.

◆ peak_bytes

std::uint64_t q3::ResidentMemorySample::peak_bytes = 0

◆ shared_bytes

std::uint64_t q3::ResidentMemorySample::shared_bytes = 0

Resident shared pages: mapped files and shared-memory segments.

Definition at line 55 of file memory.hpp.


The documentation for this struct was generated from the following file: