17 #if !defined(_WIN32) && !defined(__APPLE__) && !defined(__MINGW32__)
18 #include <sys/types.h>
35 #if !defined(_WIN32) && !defined(__APPLE__) && !defined(__MINGW32__)
36 std::string fname(
"/proc/");
37 std::stringstream str_pid;
38 str_pid << static_cast<unsigned>(getpid());
39 fname += str_pid.str();
43 std::ifstream in(fname.c_str(), std::ios::in);
51 vmem_size_ =
static_cast<unsigned long>(pages) *
52 static_cast<unsigned long>(getpagesize());
Definition of the MemWatch class.
unsigned updateMemUsage()
unsigned long getVirtMemUsage()