mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-23 01:10:46 +00:00
fix(heap): Fix wrong config to enable MALLOC_CAP_EXEC in memory_layout.c
In esp32c2 and esp32c61 memory_layout.c files, the config used to allow MALLOC_CAP_EXEC was CONFIG_ESP_SYSTEM_MEMPROT_FEATURE when CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT should be used. Closes https://github.com/espressif/esp-idf/issues/14836
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
#define ALLOC_SZ 1024
|
||||
|
||||
#ifndef CONFIG_ESP_SYSTEM_MEMPROT_FEATURE
|
||||
#if !(CONFIG_ESP_SYSTEM_MEMPROT_FEATURE || CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT)
|
||||
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
|
||||
@@ -78,4 +78,4 @@ TEST_CASE("Allocate D/IRAM as IRAM", "[heap][qemu-ignore]")
|
||||
|
||||
free(iram);
|
||||
}
|
||||
#endif // CONFIG_ESP_SYSTEM_MEMPROT_FEATURE
|
||||
#endif // !(CONFIG_ESP_SYSTEM_MEMPROT_FEATURE || CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT)
|
||||
|
Reference in New Issue
Block a user