|
Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
|
#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. | |
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.
|
inlinestatic |
Definition at line 152 of file memory.hpp.
References to_gibibytes().
Referenced by q3::ProfilingCounters::log_resident_checkpoint(), q3::ProfilingCounters::log_resident_checkpoint_debug(), main(), q3::ProfilingCounters::print_memory_summary(), and q3::ProfilingCounters::release_unused_heap().
|
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().
|
inlinestatic |
Definition at line 63 of file memory.hpp.
Referenced by format_gibibytes().
| 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.
| bool q3::ResidentMemorySample::available = false |
Whether any source could be read.
Definition at line 59 of file memory.hpp.
Referenced by q3::ProfilingCounters::log_resident_checkpoint(), q3::ProfilingCounters::log_resident_checkpoint_debug(), q3::ProfilingCounters::record_resident_memory(), and q3::ProfilingCounters::release_unused_heap().
| std::uint64_t q3::ResidentMemorySample::current_bytes = 0 |
Resident set size at the moment of sampling.
Definition at line 49 of file memory.hpp.
Referenced by q3::ProfilingCounters::log_resident_checkpoint(), q3::ProfilingCounters::log_resident_checkpoint_debug(), q3::ProfilingCounters::record_resident_memory(), and q3::ProfilingCounters::release_unused_heap().
| 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.
| std::uint64_t q3::ResidentMemorySample::peak_bytes = 0 |
High-water mark of the resident set over the life of the process.
Definition at line 51 of file memory.hpp.
Referenced by q3::ProfilingCounters::log_resident_checkpoint(), q3::ProfilingCounters::log_resident_checkpoint_debug(), q3::ProfilingCounters::record_resident_memory(), and q3::ProfilingCounters::release_unused_heap().
| 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.