-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmemory.h
More file actions
35 lines (31 loc) · 752 Bytes
/
memory.h
File metadata and controls
35 lines (31 loc) · 752 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
/*
* Memory.h
*
* Created on: Oct 24, 2017
* Author: kolban
*/
#ifndef COMPONENTS_CPP_UTILS_MEMORY_H_
#define COMPONENTS_CPP_UTILS_MEMORY_H_
#include "sdkconfig.h"
#ifdef CONFIG_HEAP_TRACING
#include <string>
extern "C" {
#include <esp_heap_trace.h>
}
class Memory {
public:
static bool checkIntegrity();
static void dump();
static void dumpRanges();
static void dumpHeapChange(std::string tag);
static void init(uint32_t recordCount);
static void resumeTrace();
static void startTraceAll();
static void startTraceLeaks();
static void stopTrace();
private:
static heap_trace_record_t* m_pRecords;
static size_t m_lastHeapSize; // Size of last heap recorded.
};
#endif
#endif /* COMPONENTS_CPP_UTILS_MEMORY_H_ */