Просмотр исходного кода

Heap: fix typos in test and component

Omar Chebib 3 лет назад
Родитель
Сommit
e7cb672624
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      components/heap/multi_heap.c
  2. 1 1
      components/heap/test/test_malloc_caps.c

+ 1 - 1
components/heap/multi_heap.c

@@ -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;

+ 1 - 1
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)));