51 peak_ = size_ = rss_ = -1;
61 if (sscanf(line.c_str(),
"%30s %d", tag, &value) == 2)
63 if (!strcmp(tag,
"VmPeak:"))
67 else if (!strcmp(tag,
"VmSize:"))
71 else if (!strcmp(tag,
"VmRSS:"))
94 is >> m.peak_ >> m.size_ >> m.rss_;
101 "Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::memInfo&)" 117 "Foam::Ostream& Foam::operator<<(Foam::Ostream&, " 118 "const Foam::memInfo&)" Istream & readBegin(const char *funcName)
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
const memInfo & update()
Parse /proc/<pid>/status.
bool good() const
Return true if next operation might succeed.
Istream & readEnd(const char *funcName)
Istream & operator>>(Istream &, directionInfo &)
bool valid() const
True if the memory information appears valid.
pid_t pid()
Return the PID of this process.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Memory usage information for the process running this object.
word name(const complex &)
Return a string representation of a complex.
ISstream & getLine(string &, const bool continuation=true)
Read line into a string.
Ostream & operator<<(Ostream &, const ensightPart &)