lib: libc: malloc.c: fix calculation of sys heap
Change the condition so that ESP32 SoCs are using `_heap_sentry` to get actual run-time heap size. Signed-off-by: Marek Matej <marek.matej@espressif.com>
This commit is contained in:
parent
f925d0759a
commit
65d2139dc6
@ -101,8 +101,8 @@ static POOL_SECTION unsigned char __aligned(HEAP_ALIGN) malloc_arena[HEAP_SIZE];
|
||||
|
||||
# define HEAP_BASE ROUND_UP(USED_RAM_END_ADDR, HEAP_ALIGN)
|
||||
|
||||
# if defined(CONFIG_XTENSA) && (defined(CONFIG_SOC_FAMILY_INTEL_ADSP) \
|
||||
|| defined(CONFIG_HAS_ESPRESSIF_HAL))
|
||||
# if (defined(CONFIG_XTENSA) && defined(CONFIG_SOC_FAMILY_INTEL_ADSP)) \
|
||||
|| defined(CONFIG_HAS_ESPRESSIF_HAL)
|
||||
extern char _heap_sentry[];
|
||||
# define HEAP_SIZE ROUND_DOWN((POINTER_TO_UINT(_heap_sentry) - HEAP_BASE), HEAP_ALIGN)
|
||||
# else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user