Public Member Functions | Friends | List of all members
memInfo Class Reference

Memory usage information for the current process, and the system memory that is free. More...

Public Member Functions

 memInfo ()
 
 ~memInfo ()=default
 
bool valid () const
 
void clear ()
 
const memInfoupdate ()
 
int peak () const
 
int size () const
 
int rss () const
 
int free () const
 
void write (Ostream &os) const
 

Friends

Istreamoperator>> (Istream &is, memInfo &m)
 
Ostreamoperator<< (Ostream &os, const memInfo &m)
 

Detailed Description

Memory usage information for the current process, and the system memory that is free.

Note
Uses the information from /proc/PID/status and from /proc/meminfo
Source files

Definition at line 58 of file memInfo.H.

Constructor & Destructor Documentation

◆ memInfo()

memInfo ( )

Definition at line 31 of file memInfo.C.

References memInfo::update().

Here is the call graph for this function:

◆ ~memInfo()

~memInfo ( )
default

Member Function Documentation

◆ valid()

bool valid ( ) const

Definition at line 44 of file memInfo.C.

◆ clear()

void clear ( )

Definition at line 50 of file memInfo.C.

◆ update()

const Foam::memInfo & update ( )

Definition at line 57 of file memInfo.C.

References clear(), Foam::glTF::key(), and Foam::pid().

Referenced by memInfo::memInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ peak()

int peak ( ) const
inline

Definition at line 99 of file memInfo.H.

◆ size()

int size ( ) const
inline

Definition at line 105 of file memInfo.H.

Referenced by indexedOctree< Foam::treeDataPrimitivePatch< PatchType > >::indexedOctree().

Here is the caller graph for this function:

◆ rss()

int rss ( ) const
inline

Definition at line 111 of file memInfo.H.

◆ free()

int free ( ) const
inline

Definition at line 117 of file memInfo.H.

◆ write()

void write ( Ostream os) const

Definition at line 154 of file memInfo.C.

References os(), and Ostream::writeEntry().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream is,
memInfo m 
)
friend

◆ operator<<

Ostream& operator<< ( Ostream os,
const memInfo m 
)
friend

The documentation for this class was generated from the following files: