ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
MemoryInfo.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 // LOCAL
11 #include <cstddef>
12 #include <ostream>
13 
14 #include "CVCoreLib.h"
15 
16 namespace cloudViewer {
17 namespace system {
18 
20  std::size_t totalRam{0};
21  std::size_t freeRam{0};
22  std::size_t availableRam{0};
23  // std::size_t sharedRam{0};
24  // std::size_t bufferRam{0};
25  std::size_t totalSwap{0};
26  std::size_t freeSwap{0};
27  std::string toString();
28 };
29 
31 
32 std::ostream& operator<<(std::ostream& os, const MemoryInfo& infos);
33 
34 } // namespace system
35 } // namespace cloudViewer
#define CV_CORE_LIB_API
Definition: CVCoreLibWin.h:15
MemoryInfo getMemoryInfo()
Definition: MemoryInfo.cpp:63
std::ostream & operator<<(std::ostream &os, const MemoryInfo &infos)
Definition: MemoryInfo.cpp:146
Generic file read and write utility for python interface.
std::string toString(T x)
Definition: Common.h:80