Memory usage information for the current process, and the system memory that is free. More...
Public Member Functions | |
| memInfo () | |
| Construct and populate with values. More... | |
| bool | good () const noexcept |
| True if the memory information appears valid. More... | |
| int64_t | peak () const noexcept |
| Peak memory at last update - (VmPeak in /proc/PID/status) More... | |
| int64_t | size () const noexcept |
| Memory size at last update - (VmSize in /proc/PID/status) More... | |
| int64_t | rss () const noexcept |
| Resident set size at last update - (VmRSS in /proc/PID/status) More... | |
| int64_t | free () const noexcept |
| System memory free (MemFree in /proc/meminfo) More... | |
| void | clear () noexcept |
| Reset to zero. More... | |
| const memInfo & | update () |
| Update according to /proc/PID/status and /proc/memory contents. More... | |
| void | writeEntries (Ostream &os) const |
| Write mem-info as dictionary entries. More... | |
| void | writeEntry (const word &keyword, Ostream &os) const |
| Write mem-info as dictionary. More... | |
Friends | |
| Ostream & | operator<< (Ostream &os, const memInfo &m) |
| Write peak/size/rss to stream. More... | |
Memory usage information for the current process, and the system memory that is free.
|
noexcept |
|
inlinenoexcept |
Peak memory at last update - (VmPeak in /proc/PID/status)
Definition at line 113 of file memInfo.H.
Referenced by Foam::operator<<().

|
inlinenoexcept |
Memory size at last update - (VmSize in /proc/PID/status)
Definition at line 118 of file memInfo.H.
Referenced by indexedOctree< Foam::treeDataPrimitivePatch< PatchType > >::indexedOctree(), and Foam::operator<<().

|
inlinenoexcept |
Resident set size at last update - (VmRSS in /proc/PID/status)
Definition at line 123 of file memInfo.H.
Referenced by Foam::operator<<().

|
inlinenoexcept |
System memory free (MemFree in /proc/meminfo)
Definition at line 128 of file memInfo.H.
Referenced by Foam::operator<<().

| const Foam::memInfo & update | ( | ) |
| void writeEntries | ( | Ostream & | os | ) | const |
Write mem-info as dictionary entries.
Definition at line 161 of file memInfo.C.
References os(), and Ostream::writeEntry().

Write mem-info as dictionary.
Definition at line 171 of file memInfo.C.
References Ostream::beginBlock(), Ostream::endBlock(), and os().
