fix(esp_psram): fix a bug in PSRAM heap registration

This commit fixes a bug in the PSRAM heap initialization that didn't take into
account the reserved himem area when registering the PSRAM virtual space as a heap.
This commit is contained in:
Omar Chebib
2024-12-17 12:20:18 +08:00
parent eb5e602ab2
commit 410276dda0
2 changed files with 57 additions and 1 deletions
+1
View File
@@ -284,6 +284,7 @@ esp_err_t esp_psram_init(void)
#if CONFIG_IDF_TARGET_ESP32
s_psram_ctx.regions_to_heap[PSRAM_MEM_8BIT_ALIGNED].size -= esp_himem_reserved_area_size() - 1;
s_psram_ctx.regions_to_heap[PSRAM_MEM_8BIT_ALIGNED].vaddr_end -= esp_himem_reserved_area_size();
#endif
//will be removed, TODO: IDF-6944