Newer
Older
* Copyright (c) 2012, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.com/LICENSE.txt
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
*/
#ifndef MEMWATCH_H_
#define MEMWATCH_H_
#ifndef WIN32
#include <sys/types.h>
#include <unistd.h>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
namespace BaseLib {
class MemWatch {
public:
MemWatch ();
unsigned long getVirtMemUsage ();
unsigned long getResMemUsage ();
unsigned long getShrMemUsage ();
unsigned long getCodeMemUsage ();
private:
unsigned updateMemUsage ();
unsigned long _vmem_size;
unsigned long _rmem_size;
unsigned long _smem_size;
unsigned long _cmem_size;
};
}
#endif // not Windows
#endif /* MEMWATCH_H_ */