NGSolve  4.9
ngstd/memusage.hpp
00001 #ifndef FILE_MEMUSAGE
00002 #define FILE_MEMUSAGE
00003 
00004 /**************************************************************************/
00005 /* File:   memusage.hpp                                                   */
00006 /* Author: Joachim Schoeberl                                              */
00007 /* Date:   16. June 2002                                                  */
00008 /**************************************************************************/
00009 
00010 namespace ngstd
00011 {
00012 
00016 class MemoryUsageStruct
00017 {
00018 protected:
00019   string name;
00020   int nbytes;
00021   int nblocks;
00022 public:
00023   MemoryUsageStruct (const string & aname,
00024                      int anbytes,
00025                      int anblocks)
00026     : name(aname), nbytes(anbytes), nblocks(anblocks)
00027   { ; }
00028 
00029   void AddName (const string & aname) { name += aname; }
00030   const string & Name() const { return name; }
00031   int NBytes () const { return nbytes; }
00032   int NBlocks () const { return nblocks; }
00033 };
00034 
00035 }
00036 
00037 #endif