mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
feat(heap): Dissociate heap poisoning from task tracking
In order to enable CONFIG_HEAP_TASK_TRACKING, some kind of poisoning had to be enabled (!HEAP_POISONING_DISABLED). However since those functionalities don't seem to be related in any way, this commit decouple them by removing MULTI_HEAP_BLOCK_OWNER from poison_head_t in multi_heap_poisoning.c and handling the block ownership in heap_caps.c instead. Note that handling task tracking in multi_heap.c would necessitate updating the ROM implementation of multi_heap.c as well. For this reason, the task tracking feature has to be handled in heap_caps.c.
This commit is contained in:
@@ -68,8 +68,7 @@ size_t heap_caps_get_per_task_info(heap_task_info_params_t *params)
|
||||
}
|
||||
void *p = multi_heap_get_block_address(b); // Safe, only arithmetic
|
||||
size_t bsize = multi_heap_get_allocated_size(heap, p); // Validates
|
||||
TaskHandle_t btask = (TaskHandle_t)multi_heap_get_block_owner(b);
|
||||
|
||||
TaskHandle_t btask = MULTI_HEAP_GET_BLOCK_OWNER(p);
|
||||
// Accumulate per-task allocation totals.
|
||||
if (params->totals) {
|
||||
size_t i;
|
||||
|
Reference in New Issue
Block a user