Changeset 6890 for trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
- Timestamp:
- 03/29/05 09:56:16 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r6513 r6890 263 263 264 264 return kTRUE; 265 } 266 267 // -------------------------------------------------------------------------- 268 // 269 // Return the memory currently used by this process (VmSize) 270 // which contains shared memory, data memory and private memory. 271 // 272 UInt_t MEvtLoop::GetMemoryUsage() 273 { 274 const TString path = Form("/proc/%d/status", gSystem->GetPid()); 275 if (gSystem->AccessPathName(path, kFileExists)) 276 return 0; 277 278 return TEnv(path).GetValue("VmSize", 0); 265 279 } 266 280 … … 400 414 return kFALSE; 401 415 416 const UInt_t mem0 = GetMemoryUsage(); 417 402 418 // 403 419 // loop over all events and process all tasks for … … 514 530 if (numcnts>0) 515 531 *fLog << " --> " << numcnts/clock.RealTime() << " Events/s"; 532 533 534 const UInt_t mem1 = GetMemoryUsage(); 535 if (mem1>mem0) 536 *fLog << endl << "Mem - Loss: " << mem1-mem0 << "kB" << endl; 516 537 517 538 *fLog << endl << endl;
Note:
See TracChangeset
for help on using the changeset viewer.