mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
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:
commit
047903c612
@ -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;
|
||||
|
@ -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)));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user