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... | |
| ~memInfo ()=default | |
| Destructor. More... | |
| bool | good () const noexcept |
| True if the memory information appears valid. More... | |
| void | clear () noexcept |
| Reset to zero. More... | |
| const memInfo & | update () |
| Update according to /proc/PID/status and /proc/memory contents. More... | |
| int | peak () const noexcept |
| Peak memory (VmPeak in /proc/PID/status) at last update() More... | |
| int | size () const noexcept |
| Memory size (VmSize in /proc/PID/status) at last update() More... | |
| int | rss () const noexcept |
| Resident set size (VmRSS in /proc/PID/status) at last update() More... | |
| int | free () const noexcept |
| System memory free (MemFree in /proc/meminfo) More... | |
| void | write (Ostream &os) const |
| Write content as dictionary entries. More... | |
| bool | valid () const noexcept |
| True if the memory information appears valid. More... | |
Friends | |
| Istream & | operator>> (Istream &is, memInfo &m) |
| Read peak/size/rss from stream. More... | |
| 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.
| memInfo | ( | ) |
Construct and populate with values.
Definition at line 31 of file memInfo.C.
References memInfo::update().

|
default |
Destructor.
|
noexcept |
True if the memory information appears valid.
Definition at line 44 of file memInfo.C.
Referenced by memInfo::valid().

| const Foam::memInfo & update | ( | ) |
Update according to /proc/PID/status and /proc/memory contents.
Definition at line 57 of file memInfo.C.
References clear(), Foam::glTF::key(), and Foam::pid().
Referenced by memInfo::memInfo().


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

|
inlinenoexcept |
|
inlinenoexcept |
| void write | ( | Ostream & | os | ) | const |
Write content as dictionary entries.
Definition at line 154 of file memInfo.C.
References os(), and Ostream::writeEntry().

|
inlinenoexcept |
True if the memory information appears valid.
Definition at line 163 of file memInfo.H.
References memInfo::good().

Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.