X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=STEER%2FAliMemoryWatcher.cxx;h=e94afee0dd6341199e5759a60e1abb3aeab2c6c4;hb=ab737211a7333ab0042623b0a8f6773bc8907f90;hp=c19464746a736c1b4ef0d80d274e1a93638da2f0;hpb=21bf7095173459ea18fc36cc9387a9bb563fa194;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliMemoryWatcher.cxx b/STEER/AliMemoryWatcher.cxx index c19464746a7..e94afee0dd6 100644 --- a/STEER/AliMemoryWatcher.cxx +++ b/STEER/AliMemoryWatcher.cxx @@ -62,38 +62,43 @@ class assert ; ClassImp(AliMemoryWatcher) //_____________________________________________________________________________ -AliMemoryWatcher::AliMemoryWatcher(UInt_t maxsize) +AliMemoryWatcher::AliMemoryWatcher(UInt_t maxsize) : + TObject(), + fUseMallinfo(kTRUE), + fPID(gSystem->GetPid()), + fMAXSIZE(maxsize), + fSize(0), + fX(new Int_t[fMAXSIZE]), + fVSIZE(new Int_t[fMAXSIZE]), + fRSSIZE(new Int_t[fMAXSIZE]), + fTIME(new Double_t[fMAXSIZE]), + fTimer(0), + fDisabled(kFALSE) { + // //ctor - fMAXSIZE=maxsize; - fUseMallinfo = true; - fPID = gSystem->GetPid(); + // sprintf(fCmd,"ps -h -p %d -o vsize,rssize",fPID); - fX = new Int_t[fMAXSIZE]; - fVSIZE = new Int_t[fMAXSIZE]; - fRSSIZE = new Int_t[fMAXSIZE]; - fTIME = new Double_t[fMAXSIZE]; - fSize=0; - fDisabled=false; - fTimer=0; } + //_____________________________________________________________________________ AliMemoryWatcher::AliMemoryWatcher(const AliMemoryWatcher& mw): - TObject(mw) + TObject(mw), + fUseMallinfo(mw.fUseMallinfo), + fPID(mw.fPID), + fMAXSIZE(mw.fMAXSIZE), + fSize(0), + fX(new Int_t[fMAXSIZE]), + fVSIZE(new Int_t[fMAXSIZE]), + fRSSIZE(new Int_t[fMAXSIZE]), + fTIME(new Double_t[fMAXSIZE]), + fTimer(0), + fDisabled(kFALSE) { //copy ctor - fMAXSIZE = mw.fMAXSIZE ; - fUseMallinfo = mw.fUseMallinfo; - fPID = mw.fPID ; strcpy(fCmd, mw.fCmd) ; - fX = new Int_t[fMAXSIZE]; - fVSIZE = new Int_t[fMAXSIZE]; - fRSSIZE = new Int_t[fMAXSIZE]; - fTIME = new Double_t[fMAXSIZE]; - fSize=0; - fDisabled=false; - fTimer=0; } + //_____________________________________________________________________________ AliMemoryWatcher::~AliMemoryWatcher() { @@ -221,7 +226,7 @@ AliMemoryWatcher::Frame(void) const } //_____________________________________________________________________________ Int_t -AliMemoryWatcher::Write(const char *, Int_t, Int_t) +AliMemoryWatcher::WriteToFile() { // Stores the graphs in a file if ( GraphVSIZE() ) GraphVSIZE()->Write("VSIZE",TObject::kOverwrite);