mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
heap: support aligned_alloc for retention memory on ESP32-C3
This commit is contained in:
parent
78072b32ff
commit
47f469b238
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user