|
Geophysical Inversion and Modelling Library v1.5.4
|
Memory watch. More...
#include <memwatch.h>
Inheritance diagram for GIMLI::MemWatch:
Collaboration diagram for GIMLI::MemWatch:Public Member Functions | |
| double | inUse () |
| double | current () |
| void | info (const std::string &str="") |
Protected Attributes | |
| double | last_ |
Friends | |
| class | Singleton< MemWatch > |
Additional Inherited Members | |
Static Public Member Functions inherited from GIMLI::Singleton< MemWatch > | |
| static MemWatch * | pInstance () |
| static MemWatch & | instance () |
Protected Member Functions inherited from GIMLI::Singleton< MemWatch > | |
| Singleton () | |
| Singleton (const Singleton &) | |
Memory watch.
Class that might help debugging memory usage. Informations are taken from /proc system, so only available for linux systems. This is a singleton class to ensure a single instance. To call it use e.g.: MemWatch::instance().info(WHERE);
| double GIMLI::MemWatch::current | ( | ) |
| void GIMLI::MemWatch::info | ( | const std::string & | str = "" | ) |
| double GIMLI::MemWatch::inUse | ( | ) |
Return the current memory usage of the process. Values are in MByte.
References GIMLI::MByte().
Referenced by current(), info(), and GIMLI::memoryInUse().