ls1-MarDyn
ls1-MarDyn molecular dynamics code
src
io
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
13
class
MemoryProfilable
{
14
public
:
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
22
class
MemoryProfiler
{
23
private
:
24
std::vector<MemoryProfilable **> _list;
25
int
_hugePageSize;
// in kB
26
public
:
27
MemoryProfiler
();
28
29
void
registerObject(
MemoryProfilable
**
object
);
30
31
void
doOutput(
const
std::string
& stepInfo =
std::string
());
32
33
private
:
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
MemoryProfilable
Definition:
MemoryProfiler.h:13
MemoryProfiler
Definition:
MemoryProfiler.h:22
xml_schema::string
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
Definition:
vtk-punstructured.h:270
Generated on Thu Oct 21 2021 02:54:36 for ls1-MarDyn by
1.9.2