heap: Drop priority of DMA reserved memory pool

Ensures that non-reserved memory should be used up first, before allocating from this pool.
This commit is contained in:
Angus Gratton 2018-08-20 16:14:13 +10:00 committed by bot
parent 776c57e0ac
commit c4ed9d15f7

View file

@ -185,7 +185,7 @@ esp_err_t esp_spiram_reserve_dma_pool(size_t size) {
return ESP_ERR_NO_MEM; return ESP_ERR_NO_MEM;
} }
uint32_t caps[] = { MALLOC_CAP_DMA|MALLOC_CAP_INTERNAL, 0, MALLOC_CAP_8BIT|MALLOC_CAP_32BIT }; uint32_t caps[] = { 0, MALLOC_CAP_DMA|MALLOC_CAP_INTERNAL, MALLOC_CAP_8BIT|MALLOC_CAP_32BIT };
esp_err_t e = heap_caps_add_region_with_caps(caps, (intptr_t) dma_heap, (intptr_t) dma_heap+next_size-1); esp_err_t e = heap_caps_add_region_with_caps(caps, (intptr_t) dma_heap, (intptr_t) dma_heap+next_size-1);
if (e != ESP_OK) { if (e != ESP_OK) {
return e; return e;