mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 20:00:53 +00:00
fix(heap): Fix bugs in heap task tracking
Update task tracking feature to fix bugs introduced when decoupling task tracking from heap poisoning. Closes https://github.com/espressif/esp-idf/issues/12498 Closes https://github.com/espressif/esp-idf/issues/12493
This commit is contained in:
@@ -72,6 +72,7 @@ inline static void multi_heap_assert(bool condition, const char *format, int lin
|
||||
#define MULTI_HEAP_REMOVE_BLOCK_OWNER_OFFSET(HEAD) ((TaskHandle_t*)(HEAD) - 1)
|
||||
#define MULTI_HEAP_ADD_BLOCK_OWNER_SIZE(SIZE) ((SIZE) + sizeof(TaskHandle_t))
|
||||
#define MULTI_HEAP_REMOVE_BLOCK_OWNER_SIZE(SIZE) ((SIZE) - sizeof(TaskHandle_t))
|
||||
#define MULTI_HEAP_BLOCK_OWNER_SIZE() sizeof(TaskHandle_t)
|
||||
#else
|
||||
#define MULTI_HEAP_SET_BLOCK_OWNER(HEAD)
|
||||
#define MULTI_HEAP_GET_BLOCK_OWNER(HEAD) (NULL)
|
||||
@@ -79,6 +80,7 @@ inline static void multi_heap_assert(bool condition, const char *format, int lin
|
||||
#define MULTI_HEAP_REMOVE_BLOCK_OWNER_OFFSET(HEAD) (HEAD)
|
||||
#define MULTI_HEAP_ADD_BLOCK_OWNER_SIZE(SIZE) (SIZE)
|
||||
#define MULTI_HEAP_REMOVE_BLOCK_OWNER_SIZE(SIZE) (SIZE)
|
||||
#define MULTI_HEAP_BLOCK_OWNER_SIZE() 0
|
||||
#endif // CONFIG_HEAP_TASK_TRACKING
|
||||
|
||||
#else // MULTI_HEAP_FREERTOS
|
||||
|
Reference in New Issue
Block a user