Re: GetMemInfo and GetProcInfo

From: Fons Rademakers <Fons.Rademakers_at_cern.ch>
Date: Thu, 08 Mar 2007 17:24:57 +0100


Dear Chiara,

  GetMemInfo() returns to total memory used on your system. To get the memory (and cpu) used by a specific process use GetProcInfo().

Cheers, Fons.

Chiara Zampolli wrote:
> <div class="moz-text-flowed" style="font-family: -moz-fixed">Dear all,
>
> I am using the TSystem GetMemInfo and GetProcInfo methods to monitor
> the CPU memory usage during the execution of a macro. What I would
> expect to find is something of the order of hundreds of MB for the used
> memory (at least this is what I get using "top"), while what I get with,
> for example,
>
> gSystem->GetMemInfo(&memInfo);
> cout << " Mem Used = " << memInfo.fMemUsed << endl; //returning value
> in MB
>
> is of the order of tens of GB. Probably I have not fully understood what
> these method return... Could anyone help me in using correctly these
> methods?
>
> Thank you a lot in advance.
> Best Regards,
> Chiara
> </div>

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers_at_cern.ch              Phone: +41 22 7679248
WWW:    http://fons.rademakers.org           Fax:   +41 22 7669640
Received on Thu Mar 08 2007 - 17:24:35 CET

This archive was generated by hypermail 2.2.0 : Thu Mar 08 2007 - 23:50:01 CET