19#ifndef _GIMLI_MEMWATCH__H
20#define _GIMLI_MEMWATCH__H
24#define MEMINFO GIMLI::MemWatch::instance().info(WHERE);
29inline double KByte(
long byte){
return double(
byte / 1024.0); }
32inline double MByte(
long byte){
return double(
byte / (1024.0 * 1024.0)); }
35inline double GByte(
long byte){
return double(
byte / (1024.0 * 1024.0 * 1024)); }
42class DLLEXPORT MemWatch :
public Singleton< MemWatch > {
53 void info(
const std::string & str=
"");
64 MemWatch(
const MemWatch &){};
66 void operator = (
const MemWatch &){ };
78DLLEXPORT
long maxMem();
void info(const std::string &str="")
Definition memwatch.cpp:102
double inUse()
Definition memwatch.cpp:65
double current()
Definition memwatch.cpp:59
Singleton()
Definition gimli.h:634
static MemWatch & instance()
Definition gimli.h:628
Definition stopwatch.h:62
GIMLi main namespace for the Geophyiscal Inversion and Modelling Library.
Definition baseentity.h:24
double MByte(long byte)
Definition memwatch.h:32
double KByte(long byte)
Definition memwatch.h:29
double GByte(long byte)
Definition memwatch.h:35
double memoryInUse()
Definition memwatch.h:74