AutoPas  3.0.0
Loading...
Searching...
No Matches
MemoryProfiler.h
Go to the documentation of this file.
1
7#pragma once
8
9#include <sys/stat.h>
10
11#include <cstdlib>
12#include <fstream>
13
14#ifdef __APPLE__
15#include <mach/mach.h>
16#endif
17
19
21
25constexpr const char *statusFileName = "/proc/self/status";
26
31size_t currentMemoryUsage();
32
33} // namespace autopas::memoryProfiler
This namespace is used for memory profiling functions.
Definition: namespaces.h:26
size_t currentMemoryUsage()
Reads the current RAM (VmRSS) usage from the operating system.
Definition: MemoryProfiler.cpp:9
constexpr const char * statusFileName
path to status file of current process
Definition: MemoryProfiler.h:25