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

|
static |
True if memory information appears to be supported.
Definition at line 43 of file memInfo.C.
References is_supported().

|
noexcept |
True if the memory information appears valid.
Definition at line 71 of file memInfo.C.
References Foam::noexcept.
|
inlinenoexcept |
Peak memory at last update - (VmPeak in /proc/PID/status).
Definition at line 119 of file memInfo.H.
References Foam::noexcept.
Referenced by Foam::operator<<().

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

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

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

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


Write mem-info as dictionary.
Definition at line 240 of file memInfo.C.
References os(), and writeEntries().
Referenced by operator<<.


Write peak/size/rss to stream.
References memInfo(), os(), writeEntries(), and writeEntry().