DQMServices/Components/plugins/DQMStoreStats.cc
///
/// read virtual memory size from /proc/<pid>/status file
///
read virtual memory size from /proc//status file
read virtual memory size from / proc // status file
std::pair<unsigned int, unsigned int> DQMStoreStats::readMemoryEntry() const {
  if (isOpenProcFileSuccessful_) {
    std::ifstream procFile(procFileName_.str().c_str(), ios::in);
    std::string readBuffer("");
    unsigned int memSize = 0;
    while (!procFile.eof()) {
      procFile >> readBuffer;
      if (std::string("VmSize:") == readBuffer) {
        procFile >> memSize;
        break;
      }
    }
    procFile.close();
    return std::pair<time_t, unsigned int>(time(nullptr), memSize);
  }
  return std::pair<time_t, unsigned int>(0, 0);
}
std :: pair < unsigned int , unsigned int > DQMStoreStats :: readMemoryEntry ( ) const { if ( isOpenProcFileSuccessful_ ) { std :: ifstream procFile ( procFileName_ . str ( ) . c_str ( ) , ios :: in ) ; std :: string readBuffer ( " " ) ; unsigned int memSize = 0 ; while ( ! procFile . eof ( ) ) { procFile >> readBuffer ; if ( std :: string ( " " ) == readBuffer ) { procFile >> memSize ; break ; } } procFile . close ( ) ; return std :: pair < time_t , unsigned int > ( time ( nullptr ) , memSize ) ; } return std :: pair < time_t , unsigned int > ( 0 , 0 ) ; }
read virtual memory size from /proc/<pid>/status file
read virtual memory size from / proc / <pid > / status file
// see if initial test reading was successful // scan procfile