mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 20:24:32 +02:00
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:
@@ -561,16 +561,6 @@ IRAM_ATTR void *heap_caps_aligned_alloc(size_t alignment, size_t size, uint32_t
|
|||||||
return NULL;
|
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++) {
|
for (int prio = 0; prio < SOC_MEMORY_TYPE_NO_PRIOS; prio++) {
|
||||||
//Iterate over heaps and check capabilities at this priority
|
//Iterate over heaps and check capabilities at this priority
|
||||||
heap_t *heap;
|
heap_t *heap;
|
||||||
|
Reference in New Issue
Block a user