mirror of
https://github.com/opentx/opentx.git
synced 2025-07-16 12:55:12 +03:00
Lua: Use incremental GC and also call it for Widgets (#4369)
Fixes #3885: Error in Lua Widget options handled better (does not disable entire Lua state) Disable Lua Widget if any of its functions has error.
This commit is contained in:
parent
d594843de2
commit
b493973d7d
11 changed files with 213 additions and 89 deletions
|
@ -418,9 +418,15 @@ int cliMemoryInfo(const char ** argv)
|
|||
|
||||
#if defined(LUA)
|
||||
serialPrint("\nLua:");
|
||||
serialPrint("\tScripts %d", luaGetMemUsed(lsScripts));
|
||||
#if defined(PCBHORUS)
|
||||
serialPrint("\tWidgets %d", luaGetMemUsed(lsWidgets));
|
||||
uint32_t s = luaGetMemUsed(lsScripts);
|
||||
serialPrint("\tScripts %u", s);
|
||||
#if defined(COLORLCD)
|
||||
uint32_t w = luaGetMemUsed(lsWidgets);
|
||||
uint32_t e = luaExtraMemoryUsage;
|
||||
serialPrint("\tWidgets %u", w);
|
||||
serialPrint("\tExtra %u", e);
|
||||
serialPrint("------------");
|
||||
serialPrint("\tTotal %u", s + w + e);
|
||||
#endif
|
||||
#endif
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue