]> granicus.if.org Git - esp-idf/blobdiff - components/spi_flash/flash_mmap.c
Merge branch 'bugfix/freertos_check_task_waiting_termination' into 'master'
[esp-idf] / components / spi_flash / flash_mmap.c
index 8b98e2cb108f6463f18461167b0d433466eabf80..52e64c11a5c61fc1087e9f843a036fc187813545 100644 (file)
@@ -135,7 +135,7 @@ esp_err_t IRAM_ATTR spi_flash_mmap_pages(int *pages, size_t page_count, spi_flas
             return ESP_ERR_INVALID_ARG;
         }
     }
-    mmap_entry_t* new_entry = (mmap_entry_t*) malloc(sizeof(mmap_entry_t));
+    mmap_entry_t* new_entry = (mmap_entry_t*) heap_caps_malloc(sizeof(mmap_entry_t), MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
     if (new_entry == 0) {
         return ESP_ERR_NO_MEM;
     }