fw4spl
DarwinMemoryMonitorTools.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_DARWINMEMORYMONITORTOOLS_HPP__
8 #define __FWMEMORY_TOOLS_DARWINMEMORYMONITORTOOLS_HPP__
9 
10 #ifdef __MACOSX__
11 
12 #include "fwMemory/config.hpp"
13 
14 #include <cstdint>
15 #include <string>
16 
17 namespace fwMemory
18 {
19 namespace tools
20 {
21 //------------------------------------------------------------------------------
22 
23 class FWMEMORY_CLASS_API DarwinMemoryMonitorTools
24 {
25 
26 public:
27 
28  FWMEMORY_API DarwinMemoryMonitorTools();
29 
30  FWMEMORY_API ~DarwinMemoryMonitorTools();
31 
32  FWMEMORY_API static std::uint64_t estimateFreeMem();
33 
34  FWMEMORY_API static void printProcessMemoryInformation();
35 
36  FWMEMORY_API static void printSystemMemoryInformation();
37 
38  FWMEMORY_API static void printMemoryInformation();
39 
40  FWMEMORY_API static std::uint64_t getTotalSystemMemory();
41 
42  FWMEMORY_API static std::uint64_t getUsedSystemMemory();
43 
44  FWMEMORY_API static std::uint64_t getFreeSystemMemory();
45 
46  FWMEMORY_API static std::uint64_t getUsedProcessMemory();
47 
48 };
49 
50 } // namespace tools
51 } // namespace fwMemory
52 
53 #endif
54 
55 #endif // __FWMEMORY_TOOLS_DARWINMEMORYMONITORTOOLS_HPP__
The namespace fwMemory contains tools to manage memory. Use for dump.
Definition: SReader.hpp:20