feat(heap): add a MALLOC_CAP_SIMD flag

MALLOC_CAP_SIMD can be used to allocate memory to be used for SIMD instructions
This commit is contained in:
Song Ruo Jing
2025-02-08 16:29:36 +08:00
parent b46c03040f
commit 6975924104
12 changed files with 72 additions and 18 deletions
+1 -1
View File
@@ -369,7 +369,7 @@ esp_err_t esp_psram_extram_add_to_heap_allocator(void)
{
esp_err_t ret = ESP_FAIL;
uint32_t byte_aligned_caps[] = {MALLOC_CAP_SPIRAM | MALLOC_CAP_DEFAULT, 0, MALLOC_CAP_8BIT | MALLOC_CAP_32BIT};
uint32_t byte_aligned_caps[] = {MALLOC_CAP_SPIRAM | MALLOC_CAP_DEFAULT, 0, MALLOC_CAP_8BIT | MALLOC_CAP_32BIT | MALLOC_CAP_SIMD};
ret = heap_caps_add_region_with_caps(byte_aligned_caps,
s_psram_ctx.regions_to_heap[PSRAM_MEM_8BIT_ALIGNED].vaddr_start,
s_psram_ctx.regions_to_heap[PSRAM_MEM_8BIT_ALIGNED].vaddr_end);