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