-
Notifications
You must be signed in to change notification settings - Fork 0
/
MemEstimator.h
49 lines (30 loc) · 995 Bytes
/
MemEstimator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef __MEM_ESTIMATOR_H__
#define __MEM_ESTIMATOR_H__
#include <stdint.h>
#include <vector>
namespace CMSB {
class MicroBench;
/**
* Estimates the memory consumption.
*/
class MemEstimator {
public:
/**
* Returns current allocated memory estimate in bytes.
*/
static uint64_t getCurrentMemConsumption ();
/**
* Returns the peak allocated memory estimate in bytes.
*/
static uint64_t getPeakMemConsumption ();
static void startLocalPeakMemMeasurement ();
static uint64_t getLocalPeakMemConsumption ();
static uint64_t getProcMemConsumption ();
/**
* Returns the total memory consumption of the given benchmarks.
*/
static uint64_t getBenchesMemConsumption (const std::vector<CMSB::MicroBench*>& benchmarks);
static void printSmapsFile ();
};
}
#endif