Parcourir la source

heap: Fix compilation error when CONFIG_SPIRAM is set on esp32s3 target

When CONFIG_SPIRAM is set, the TLSF_MAX_POOL_SIZE is set to SOC_EXTRAM_DATA_SIZE
which caused the TLSF_MAX_POOL_SIZE to be bigger than 16MB.

This commit fixes the issue by adding an extra else if case to cover this configuration.
Guillaume Souchere il y a 3 ans
Parent
commit
d98bfe1b42
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      components/heap/tlsf_platform.h

+ 2 - 0
components/heap/tlsf_platform.h

@@ -36,6 +36,8 @@ extern "C" {
 #define FL_INDEX_MAX_PLATFORM 23 //Each pool can have up 8MB
 #elif (TLSF_MAX_POOL_SIZE <= (16 * 1024 * 1024))
 #define FL_INDEX_MAX_PLATFORM 24 //Each pool can have up 16MB
+#elif (TLSF_MAX_POOL_SIZE <= (32 * 1024 * 1024))
+#define FL_INDEX_MAX_PLATFORM 25 //Each pool can have up 32MB
 #else
 #error "Higher TLSF pool sizes should be added for this new config"
 #endif