Go to the documentation of this file.
15 #include "hal_config.h"
113 #ifndef HAL_HEAP_MODE
114 #define HAL_HEAP_MODE 0
117 #ifndef HAL_HEAP_DEBUG
118 #define HAL_HEAP_DEBUG 0
121 #ifndef HAL_HEAP_ALIGNMENT
122 #define HAL_HEAP_ALIGNMENT 4
125 #if defined HAL_HEAP_MODE && (HAL_HEAP_MODE == 0)
130 #ifndef HAL_OS_FREERTOS
133 #define HEAP_Alloc malloc
135 #define HEAP_Free free
137 #define HEAP_Calloc calloc
139 #define HEAP_Realloc realloc
143 void* HEAP_PORT_Alloc(
size_t size);
145 void HEAP_PORT_Free(
void* ptr);
147 #define HEAP_Alloc HEAP_PORT_Alloc
149 #define HEAP_Free HEAP_PORT_Free
154 #if defined HAL_HEAP_MODE && ((HAL_HEAP_MODE == 1) || (HAL_HEAP_MODE == 2))
165 void* HEAP_Alloc(
size_t size);
172 void HEAP_Free(
void* ptr);
180 size_t HEAP_GetSpaceUsed(
void);
187 size_t HEAP_GetSpaceLeft(
void);
191 #if defined HAL_HEAP_MODE && (HAL_HEAP_MODE == 3)
196 extern void* HEAP_Alloc(
size_t size);
198 extern void HEAP_Free(
void* ptr);