mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add memInfo::valid() for detecting invalid memory info
This commit is contained in:
@ -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)
|
||||
|
||||
@ -105,6 +105,9 @@ public:
|
||||
return rss_;
|
||||
}
|
||||
|
||||
//- True if the memory information appears valid
|
||||
bool valid() const;
|
||||
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
|
||||
Reference in New Issue
Block a user