libcommonc++  0.7
MemoryStats Class Reference

System memory utilization statistics. More...

#include <MemoryStats.h++>

Inheritance diagram for MemoryStats:
Collaboration diagram for MemoryStats:

Public Member Functions

 MemoryStats ()
 Construct a new MemoryStats object. More...
 
 ~MemoryStats ()
 Destructor. More...
 
uint_t getPhysicalMemoryTotal () const
 Get the total amount of physical memory, in bytes. More...
 
uint_t getPhysicalMemoryFree () const
 Get the amount of free physical memory, in bytes. More...
 
uint_t getPhysicalMemoryUsed () const
 Get the amount of used physical memory, in bytes. More...
 
uint_t getVirtualMemoryTotal () const
 Get the total amount of virtual memory, in bytes. More...
 
uint_t getVirtualMemoryFree () const
 Get the amount of free virtual memory, in bytes. More...
 
uint_t getVirtualMemoryUsed () const
 Get the amount of used virtual memory, in bytes. More...
 
bool collect ()
 Collect (update) the stats represented by this object. More...
 
void reset ()
 Reset the stats object. More...
 

Detailed Description

System memory utilization statistics.

These statistics include the total amount of physical and virtual memory and the amount of each that is currently in use.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ MemoryStats()

Construct a new MemoryStats object.

◆ ~MemoryStats()

Destructor.

Member Function Documentation

◆ collect()

bool collect ( )
virtual

Collect (update) the stats represented by this object.

Returns
true if the stats were collected successfully, false otherwise.

Implements SystemStats.

◆ getPhysicalMemoryFree()

uint_t getPhysicalMemoryFree ( ) const
inline

Get the amount of free physical memory, in bytes.

◆ getPhysicalMemoryTotal()

uint_t getPhysicalMemoryTotal ( ) const
inline

Get the total amount of physical memory, in bytes.

◆ getPhysicalMemoryUsed()

uint_t getPhysicalMemoryUsed ( ) const
inline

Get the amount of used physical memory, in bytes.

◆ getVirtualMemoryFree()

uint_t getVirtualMemoryFree ( ) const
inline

Get the amount of free virtual memory, in bytes.

◆ getVirtualMemoryTotal()

uint_t getVirtualMemoryTotal ( ) const
inline

Get the total amount of virtual memory, in bytes.

On Mac OS X, there is no fixed-size swap partition; the amount of virtual memory is limited only by disk space on the root partition, so this value is always 0.

◆ getVirtualMemoryUsed()

uint_t getVirtualMemoryUsed ( ) const
inline

Get the amount of used virtual memory, in bytes.

◆ reset()

void reset ( )
virtual

Reset the stats object.

Implements SystemStats.


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