ENH: add memInfo::valid() for detecting invalid memory info

This commit is contained in:
Mark Olesen
2010-11-26 12:53:35 +01:00
parent 3cc1cfe07a
commit 90eb6623c5
2 changed files with 9 additions and 0 deletions

View File

@ -79,6 +79,12 @@ const Foam::memInfo& Foam::memInfo::update()
}
bool Foam::memInfo::valid() const
{
return peak_ != -1;
}
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
Foam::Istream& Foam::operator>>(Istream& is, memInfo& m)

View File

@ -105,6 +105,9 @@ public:
return rss_;
}
//- True if the memory information appears valid
bool valid() const;
// IOstream Operators