ls1-MarDyn
ls1-MarDyn molecular dynamics code
MemoryProfiler.h
1/*
2 * MemoryProfiler.h
3 *
4 * Created on: May 9, 2017
5 * Author: seckler
6 */
7
8#pragma once
9
10#include <vector>
11#include <string>
12
14public:
15 virtual ~~MemoryProfilable() {
16 }
17 virtual size_t getTotalSize() = 0;
18 virtual void printSubInfo(int offset) = 0;
19 virtual std::string getName() = 0;
20};
21
23private:
24 std::vector<MemoryProfilable **> _list;
25 int _hugePageSize; // in kB
26public:
28
29 void registerObject(MemoryProfilable** object);
30
31 void doOutput(const std::string& stepInfo = std::string());
32
33private:
34 //returns size of cached memory in kB (0 if error occurs)
35 unsigned long long getCachedSize();
36 void printGeneralInfo(const std::string& string);
37 int parseLine(char* line);
38};
39
Definition: MemoryProfiler.h:13
Definition: MemoryProfiler.h:22
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
Definition: vtk-punstructured.h:270