heap: RE-enable ESP32C2 test in test_apps

This commit is contained in:
Guillaume Souchere
2022-12-14 09:22:01 +01:00
parent 490216a2ac
commit 327bf0d608
4 changed files with 21 additions and 18 deletions

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
/*
Tests for D/IRAM support in heap capability allocator
*/
@@ -10,8 +15,7 @@
#define ALLOC_SZ 1024
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2)
//IDF-5167
#ifndef CONFIG_ESP_SYSTEM_MEMPROT_FEATURE
static void *malloc_block_diram(uint32_t caps)
{
void *attempts[256] = { 0 }; // Allocate up to 256 ALLOC_SZ blocks to exhaust all non-D/IRAM memory temporarily
@@ -74,4 +78,4 @@ TEST_CASE("Allocate D/IRAM as IRAM", "[heap]")
free(iram);
}
#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2)
#endif // CONFIG_ESP_SYSTEM_MEMPROT_FEATURE