mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-14 16:57:22 +00:00
e3c7201a20
* Furi: rename and move core * Furi: drop CMSIS_OS header and unused api, partially refactor and cleanup the rest * Furi: CMSIS_OS drop and refactoring. * Furi: refactoring, remove cmsis legacy * Furi: fix incorrect assert on queue deallocation, cleanup timer * Furi: improve delay api, get rid of floats * hal: dropped furi_hal_crc * Furi: move DWT based delay to cortex HAL * Furi: update core documentation Co-authored-by: hedger <hedger@nanode.su>
49 lines
1 KiB
C
49 lines
1 KiB
C
/**
|
|
* @file memmgr_heap.h
|
|
* Furi: heap memory managment 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
|