forked from DarkFlippers/unleashed-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
memmgr_heap.h
49 lines (39 loc) · 1.04 KB
/
memmgr_heap.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
/**
* @file memmgr_heap.h
* Furi: heap memory management API and allocator
*/
#pragma once
#include <stdint.h>
#include <core/thread.h>
#ifdef __cplusplus
extern "C" {
#endif
#define MEMMGR_HEAP_UNKNOWN 0xFFFFFFFF
/** Memmgr heap enable thread allocation tracking
*
* @param thread_id - thread id to track
*/
void memmgr_heap_enable_thread_trace(FuriThreadId taks_handle);
/** Memmgr heap disable thread allocation tracking
*
* @param thread_id - thread id to track
*/
void memmgr_heap_disable_thread_trace(FuriThreadId taks_handle);
/** Memmgr heap get allocatred thread memory
*
* @param thread_id - thread id to track
*
* @return bytes allocated right now
*/
size_t memmgr_heap_get_thread_memory(FuriThreadId taks_handle);
/** Memmgr heap get the max contiguous block size on the heap
*
* @return size_t max contiguous block size
*/
size_t memmgr_heap_get_max_free_block();
/** Print the address and size of all free blocks to stdout
*/
void memmgr_heap_printf_free_blocks();
#ifdef __cplusplus
}
#endif