forked from Samsung/gcutil
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLeakChecker.h
More file actions
41 lines (31 loc) · 803 Bytes
/
LeakChecker.h
File metadata and controls
41 lines (31 loc) · 803 Bytes
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
#ifndef __GCUtilLeakChecker__
#define __GCUtilLeakChecker__
#ifdef PROFILE_BDWGC
#include "GCUtil.h"
#include <string>
#include <vector>
namespace GCUtil {
class HeapUsageVisualizer {
public:
static void initialize();
private:
static std::string m_outputFile;
};
class GCLeakChecker {
public:
static void registerAddress(void* ptr, std::string description);
static void dumpBackTrace(const char* phase = NULL);
static void setGCPhaseName(std::string name);
private:
static void unregisterAddress(void* ptr);
struct LeakCheckedAddr {
void* ptr;
std::string description;
bool deallocated;
};
static size_t m_totalFreed;
static std::vector<LeakCheckedAddr> m_leakCheckedAddrs;
};
}
#endif // PROFILE_BDWGC
#endif // __LeakChecker__