Merge branch 'typo/heap_test' into 'master'

Heap: fix typos in test and component

See merge request espressif/esp-idf!17731
This commit is contained in:
Omar Chebib 2022-04-12 18:45:04 +08:00
commit 047903c612
2 changed files with 2 additions and 2 deletions

View File

@ -368,7 +368,7 @@ void multi_heap_get_info_impl(multi_heap_handle_t heap, multi_heap_info_t *info)
multi_heap_internal_lock(heap);
tlsf_walk_pool(tlsf_get_pool(heap->heap_data), multi_heap_get_info_tlsf, info);
/* TLSF has an overhead per block. Calculate the total amoun of overhead, it shall not be
/* TLSF has an overhead per block. Calculate the total amount of overhead, it shall not be
* part of the allocated bytes */
overhead = info->allocated_blocks * tlsf_alloc_overhead();
info->total_allocated_bytes = (heap->pool_size - tlsf_size()) - heap->free_bytes - overhead;

View File

@ -123,7 +123,7 @@ TEST_CASE("IRAM_8BIT capability test", "[heap]")
TEST_ASSERT((((int)ptr)&0xFF000000)==0x40000000);
/* As the heap allocator may present an overhead for allocated blocks,
* we need to check that the free heap size is now smaller than former free size. */
* we need to check that the free heap size is now smaller or equal to the former free size. */
TEST_ASSERT(heap_caps_get_free_size(MALLOC_CAP_IRAM_8BIT) <= (free_size - heap_caps_get_allocated_size(ptr)));
TEST_ASSERT(heap_caps_get_free_size(MALLOC_CAP_32BIT) <= (free_size32 - heap_caps_get_allocated_size(ptr)));