18 const IInterface* p ) :
46 return StatusCode::SUCCESS;
55 return StatusCode::SUCCESS;
67 bool considerInSummary) {
76 if (considerInSummary) {
83 <<
" (VmMem,diff-previous) kBytes: "
84 << curMem<<
" "<< curDiff );
97 << curUsage <<
" kBytes");
101 m_table.push_back( curInfoUsage);
110 ATH_MSG_INFO(
"*****************************************************\n"<<
111 "* (VmMem) MEMORY SUMMARY: (kBytes)");
114 InfoUsagePairVector::const_iterator it =
m_table.begin();
115 InfoUsagePairVector::const_iterator itEnd =
m_table.end();
116 for ( ; it != itEnd; ++it) {
117 const char *curInfo = (*it)->first;
118 int curUsage = (*it)->second;
120 ATH_MSG_INFO(
"* Memory Usage " << curInfo <<
"\t\t: " << curUsage);
125 if (!desc) desc =
"MemoryMonitor call";
128 ATH_MSG_INFO(
"* Average memory increase per " << desc <<
" : "
132 ATH_MSG_INFO(
"*****************************************************");
143 std::ostringstream is;
145 std::string spid=is.str();
146 std::string filename=
"mem"+spid+
".txt";
147 std::string temp=
"cat /proc/"+spid+
"/status | grep VmSize >"+filename;
148 system(temp.c_str());
149 std::ifstream in(filename.c_str());
150 std::string text,mem,text1;
151 in>>text>>mem>>text1;
152 temp=
"rm -f "+filename;
153 system(temp.c_str());
154 float memsize=atof(mem.c_str());
#define ATH_MSG_VERBOSE(x)
std::pair< const char *, int > InfoUsagePair
these datatypes used to store (infoStr,memUsage) paired info