From 5e0bfa9a60114cd93953dba18817147bebe152a2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 11 Apr 2022 12:59:49 +1000 Subject: [PATCH] AP_Scripting: increase default heap size in SITL and on F7/H7 if we have 500k or more memory then use 100k heap for Lua, making setup easier --- libraries/AP_Scripting/AP_Scripting.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Scripting/AP_Scripting.cpp b/libraries/AP_Scripting/AP_Scripting.cpp index 256a66091f..340dc60f16 100644 --- a/libraries/AP_Scripting/AP_Scripting.cpp +++ b/libraries/AP_Scripting/AP_Scripting.cpp @@ -33,8 +33,8 @@ #endif // !defined(SCRIPTING_STACK_MAX_SIZE) #if !defined(SCRIPTING_HEAP_SIZE) - #if CONFIG_HAL_BOARD == HAL_BOARD_SITL || CONFIG_HAL_BOARD == HAL_BOARD_LINUX - #define SCRIPTING_HEAP_SIZE (64 * 1024) + #if CONFIG_HAL_BOARD == HAL_BOARD_SITL || CONFIG_HAL_BOARD == HAL_BOARD_LINUX || HAL_MEM_CLASS >= HAL_MEM_CLASS_500 + #define SCRIPTING_HEAP_SIZE (100 * 1024) #else #define SCRIPTING_HEAP_SIZE (43 * 1024) #endif