From b2cc934b94a135b894db68b6df6f5a87a22b9233 Mon Sep 17 00:00:00 2001 From: Guillaume Souchere Date: Tue, 19 Dec 2023 07:07:04 +0100 Subject: [PATCH] fix(heap): Fix the use of block owner macro In heap_caps_get_info, update the use of block owner macros to use MULTI_HEAP_BLOCK_OWNER_SIZE() instead of MULTI_HEAP_ADD_BLOCK_OWNER_SIZE(0). --- components/heap/heap_caps.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/heap/heap_caps.c b/components/heap/heap_caps.c index f31f92956f..a2bf7166db 100644 --- a/components/heap/heap_caps.c +++ b/components/heap/heap_caps.c @@ -584,13 +584,13 @@ void heap_caps_get_info( multi_heap_info_t *info, uint32_t caps ) multi_heap_info_t hinfo; multi_heap_get_info(heap->heap, &hinfo); - info->total_free_bytes += hinfo.total_free_bytes - MULTI_HEAP_ADD_BLOCK_OWNER_SIZE(0); + info->total_free_bytes += hinfo.total_free_bytes - MULTI_HEAP_BLOCK_OWNER_SIZE(); info->total_allocated_bytes += (hinfo.total_allocated_bytes - - hinfo.allocated_blocks * MULTI_HEAP_ADD_BLOCK_OWNER_SIZE(0)); + hinfo.allocated_blocks * MULTI_HEAP_BLOCK_OWNER_SIZE()); info->largest_free_block = MAX(info->largest_free_block, hinfo.largest_free_block); - info->largest_free_block -= info->largest_free_block ? MULTI_HEAP_ADD_BLOCK_OWNER_SIZE(0) : 0; - info->minimum_free_bytes += hinfo.minimum_free_bytes - MULTI_HEAP_ADD_BLOCK_OWNER_SIZE(0); + info->largest_free_block -= info->largest_free_block ? MULTI_HEAP_BLOCK_OWNER_SIZE() : 0; + info->minimum_free_bytes += hinfo.minimum_free_bytes - MULTI_HEAP_BLOCK_OWNER_SIZE(); info->allocated_blocks += hinfo.allocated_blocks; info->free_blocks += hinfo.free_blocks; info->total_blocks += hinfo.total_blocks;