From 7483d760da6c1f75700f544e21b87fe0ae137035 Mon Sep 17 00:00:00 2001 From: Philippe Date: Fri, 5 Nov 2021 23:46:09 -0700 Subject: [PATCH] simplify host test Not sure was I was thinking about... --- components/heap/test_multi_heap_host/test_multi_heap.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/components/heap/test_multi_heap_host/test_multi_heap.cpp b/components/heap/test_multi_heap_host/test_multi_heap.cpp index 4c11b5fd1607..3ab88c647ea6 100644 --- a/components/heap/test_multi_heap_host/test_multi_heap.cpp +++ b/components/heap/test_multi_heap_host/test_multi_heap.cpp @@ -204,15 +204,12 @@ TEST_CASE("multi_heap defrag realloc", "[multi_heap]") void multi_heap_allocation_impl(int heap_size) { - static uint8_t hostdata[16 * 1024 * 1024]; + static uint8_t big_heap[16 * 1024 * 1024]; const int NUM_POINTERS = 64; printf("Running multi-allocation test with heap_size %d...\n", heap_size); - multi_heap_handle_t hostheap = multi_heap_register(hostdata, sizeof(hostdata)); - uint8_t *big_heap = (uint8_t *) multi_heap_malloc(hostheap, heap_size); - REQUIRE( big_heap ); - + REQUIRE( sizeof(big_heap) >= heap_size ); multi_heap_handle_t heap = multi_heap_register(big_heap, heap_size); void *p[NUM_POINTERS] = { 0 };