From 47f469b2380b1e01aa053f06174f5006d2701ee8 Mon Sep 17 00:00:00 2001 From: jiangguangming Date: Tue, 29 Dec 2020 12:44:22 +0800 Subject: [PATCH] heap: support aligned_alloc for retention memory on ESP32-C3 --- components/heap/heap_caps.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/components/heap/heap_caps.c b/components/heap/heap_caps.c index a43be02a0f..07cc258e70 100644 --- a/components/heap/heap_caps.c +++ b/components/heap/heap_caps.c @@ -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;