From 751c546a68535df5a71cd61058caeec8f6398412 Mon Sep 17 00:00:00 2001 From: Omar Chebib Date: Mon, 11 Apr 2022 11:36:52 +0800 Subject: [PATCH] Heap: fix typos in test and component --- components/heap/multi_heap.c | 2 +- components/heap/test/test_malloc_caps.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/heap/multi_heap.c b/components/heap/multi_heap.c index cf944f010f..2c85c1f7de 100644 --- a/components/heap/multi_heap.c +++ b/components/heap/multi_heap.c @@ -376,7 +376,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; diff --git a/components/heap/test/test_malloc_caps.c b/components/heap/test/test_malloc_caps.c index 857e68ac68..a2d27050a4 100644 --- a/components/heap/test/test_malloc_caps.c +++ b/components/heap/test/test_malloc_caps.c @@ -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)));