From 8fb2a7a162ab33c73fb83f995452fd3dec4b784f Mon Sep 17 00:00:00 2001 From: Guillaume Souchere Date: Wed, 3 Aug 2022 07:29:55 +0200 Subject: [PATCH] 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. --- components/heap/tlsf_platform.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/heap/tlsf_platform.h b/components/heap/tlsf_platform.h index 6b882be920..f40e0ca0f9 100644 --- a/components/heap/tlsf_platform.h +++ b/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