The ROme OpTimistic Simulator  2.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
memusage.c File Reference

Memory usage module. More...

#include <arch/memusage.h>
#include <mm/dymelor.h>
+ Include dependency graph for memusage.c:

Go to the source code of this file.

Functions

size_t getPeakRSS (void)
 
size_t getCurrentRSS (void)
 

Detailed Description

Memory usage module.

This module provides system-dependend functions to retrieve the current/peak memory usage. This is used for statistics. The original implementation is from David Robert Nadeau, which released its code under the Creative Commons Attribution 3.0 Unported License ( http://creativecommons.org/licenses/by/3.0/deed.en_US )

This file is part of ROOT-Sim (ROme OpTimistic Simulator).

ROOT-Sim is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; only version 3 of the License applies.

ROOT-Sim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with ROOT-Sim; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Author
David Robert Nadeau - http://NadeauSoftware.com/

Definition in file memusage.c.

Function Documentation

size_t getCurrentRSS ( void  )

This function computes the current resident set size (physical memory use) in an OS-independent way.

Returns
current resident set measured in bytes, or zero if the value cannot be determined

Definition at line 119 of file memusage.c.

+ Here is the caller graph for this function:

size_t getPeakRSS ( void  )

This function is used to compute the peak resident set (physical memory usage) computed in an OS-independent way.

Returns
peak resident set measured in bytes, or zero if the value cannot be determined

Definition at line 70 of file memusage.c.

+ Here is the caller graph for this function: