py/malloc: Introduce m_tracked_calloc, m_tracked_free functions.

Enabled by MICROPY_TRACKED_ALLOC.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2022-05-04 12:12:11 +10:00
parent 965747bd97
commit fca5701f74
7 changed files with 178 additions and 0 deletions

View File

@@ -125,6 +125,10 @@ typedef struct _mp_state_vm_t {
qstr_pool_t *last_pool;
#if MICROPY_TRACKED_ALLOC
struct _m_tracked_node_t *m_tracked_head;
#endif
// non-heap memory for creating an exception if we can't allocate RAM
mp_obj_exception_t mp_emergency_exception_obj;