fw4spl
MemoryMonitorTools.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWMEMORY_TOOLS_MEMORYMONITORTOOLS_HPP__
8 #define __FWMEMORY_TOOLS_MEMORYMONITORTOOLS_HPP__
9 
10 #include "fwMemory/config.hpp"
11 
12 #include <cstdint>
13 
14 namespace fwMemory
15 {
16 namespace tools
17 {
18 
19 class FWMEMORY_CLASS_API MemoryMonitorTools
20 {
21 
22 public:
23 
24  FWMEMORY_API MemoryMonitorTools();
25 
26  FWMEMORY_API ~MemoryMonitorTools();
27 
28  FWMEMORY_API static std::uint64_t estimateFreeMem();
29 
30  FWMEMORY_API static void printProcessMemoryInformation();
31 
32  FWMEMORY_API static void printSystemMemoryInformation();
33 
34  FWMEMORY_API static void printMemoryInformation();
35 
36  FWMEMORY_API static std::uint64_t getTotalSystemMemory();
37 
38  FWMEMORY_API static std::uint64_t getUsedSystemMemory();
39 
40  FWMEMORY_API static std::uint64_t getFreeSystemMemory();
41 
42  FWMEMORY_API static std::uint64_t getUsedProcessMemory();
43 
44 };
45 
46 } // namespace tools
47 } // namespace fwMemory
48 
49 #endif // __FWMEMORY_TOOLS_MEMORYMONITORTOOLS_HPP__
The namespace fwMemory contains tools to manage memory. Use for dump.
Definition: SReader.hpp:20