MeVisLab Toolbox Reference
mlMemoryInfo.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2009, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef ML_MEMORY_INFO_H
14#define ML_MEMORY_INFO_H
15
17
18#include "mlUtilsSystem.h"
19
21
22//=============================================================================
25//=============================================================================
27{
28public:
29 // --------------------------------------------------------------------------
33 // --------------------------------------------------------------------------
35
36protected:
37 // --------------------------------------------------------------------------
41 // --------------------------------------------------------------------------
43
44public:
45 // --------------------------------------------------------------------------
47 // --------------------------------------------------------------------------
48 unsigned int getTotalPhysicalMemoryInMB() const
49 {
50 return _amountOfPhysicalMemoryInMB;
51 }
52
53 // --------------------------------------------------------------------------
55 // --------------------------------------------------------------------------
56 unsigned int getAvailableMemoryInMB() const
57 {
58 return _availableMemoryInMB;
59 }
60
61private:
62 void init();
63
64 unsigned int _amountOfPhysicalMemoryInMB = 0;
65 unsigned int _availableMemoryInMB = 0;
66};
67
69#endif
Singleton class that provides hardware specific information.
static MemoryInfo & getInstance()
Returns the single existing object of this class.
MemoryInfo()
This constructor must not be called from anywhere else but the getInstance() method (which does call ...
unsigned int getAvailableMemoryInMB() const
Returns the available amount of memory in MB.
unsigned int getTotalPhysicalMemoryInMB() const
Returns the total amount of physical memory in MB.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
#define ML_UTILS_EXPORT
Defines platform dependent DLL export macro for mlUtils.
Definition mlUtilities.h:20