Merge branch 'bugfix/c3_retention_memory_aligned_alloc' into 'master'

heap: support aligned_alloc for retention memory on ESP32-C3

See merge request espressif/esp-idf!11974
This commit is contained in:
Angus Gratton
2021-01-14 06:38:09 +08:00

View File

@@ -561,16 +561,6 @@ IRAM_ATTR void *heap_caps_aligned_alloc(size_t alignment, size_t size, uint32_t
return NULL;
}
//aligned alloc for now only supports default allocator or external
//allocator.
if((caps & (MALLOC_CAP_DEFAULT | MALLOC_CAP_SPIRAM)) == 0) {
heap_caps_alloc_failed(size, caps, __func__);
return NULL;
}
//if caps requested are supported, clear undesired others:
caps &= (MALLOC_CAP_DEFAULT | MALLOC_CAP_SPIRAM);
for (int prio = 0; prio < SOC_MEMORY_TYPE_NO_PRIOS; prio++) {
//Iterate over heaps and check capabilities at this priority
heap_t *heap;