ML Reference
MeVis/Foundation/Sources/MLUtilities/mlMemoryInfo.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00004 
00009 //----------------------------------------------------------------------------------
00010 
00011 #ifndef __mlMemoryInfo_H
00012 #define __mlMemoryInfo_H
00013 
00014 #include "mlUtilsSystem.h"
00015 
00016 ML_UTILS_START_NAMESPACE
00017 
00018 //=============================================================================
00021 //=============================================================================
00022 class ML_UTILS_EXPORT MemoryInfo
00023 {
00024 public:
00025   // --------------------------------------------------------------------------
00029   // --------------------------------------------------------------------------
00030   static MemoryInfo &getInstance();
00031   
00032 protected:
00033   // --------------------------------------------------------------------------
00037   // --------------------------------------------------------------------------
00038   MemoryInfo();
00039   
00040 public:
00041   // --------------------------------------------------------------------------
00043   // --------------------------------------------------------------------------
00044   unsigned int getTotalPhysicalMemoryInMB()    const { return _amountOfPhysicalMemoryInMB; };
00045   
00046 private:
00048   void initPhysicalMemory();
00049   
00050   unsigned int _amountOfPhysicalMemoryInMB;
00051   
00052 #ifdef ML_DEPRECATED
00053   
00055 
00056   
00057 public:
00058 
00061   inline ML_DEPRECATED unsigned int amountOfPhysicalMemoryInMB() const { return getTotalPhysicalMemoryInMB(); };
00062   
00064   
00065 #endif // ML_DEPRECATED
00066   
00067 };
00068 
00069 ML_UTILS_END_NAMESPACE
00070 #endif