16 std::ostringstream is;
18 std::string spid=is.str();
19 std::string temp=
"cat /proc/"+spid+
"/status | grep VmSize > mem.txt";
21 std::ifstream in(
"mem.txt");
22 std::string text,mem,text1;
24 system(
"rm -f mem.txt");
25 float memsize=atof(mem.c_str());
27 std::cout<<
"*****************************************************"<<std::endl
29 <<
" Memory snooper called here "<<where<<std::endl
30 <<
" process size at this point (VmMem): "<<imem<<
" kBytes"<<std::endl
32 <<
"*****************************************************"<<std::endl;
MemorySnooper(std::string where)
int GetMemorySize() const