Norman is asking to see Lua ram stats more often

This commit is contained in:
rusefillc 2023-03-22 19:11:34 -04:00
parent 4380704e35
commit 9f0e2b2eb4
1 changed files with 2 additions and 0 deletions

View File

@ -177,10 +177,12 @@ static LuaHandle setupLuaState(lua_Alloc alloc) {
}
static void printLuaMemory() {
#if LUA_USER_HEAP > 1
auto heapSize = userHeap.size();
auto memoryUsed = userHeap.used();
float pct = 100.0f * memoryUsed / heapSize;
efiPrintf("Lua memory heap usage: %d / %d bytes = %.1f%%", memoryUsed, heapSize, pct);
#endif // LUA_USER_HEAP
}
static bool loadScript(LuaHandle& ls, const char* scriptStr) {