mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-02-07 23:06:35 +08:00
AP_Scripting: only print out one state memory usage
Now that startup RAM usage is not dependent on the number of bindings, there is little need to specifically measure that phase. This combines ~700 bytes used by the string setup into the initial state usage. But that number should very rarely change.
This commit is contained in:
committed by
Andrew Tridgell
parent
a550087eee
commit
1f09f80043
@@ -502,10 +502,6 @@ void lua_scripts::run(void) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef HAL_CONSOLE_DISABLED
|
||||
const int inital_mem = lua_gc(L, LUA_GCCOUNT, 0) * 1024 + lua_gc(L, LUA_GCCOUNTB, 0);
|
||||
#endif
|
||||
|
||||
lua_atpanic(L, atpanic);
|
||||
|
||||
// set up string metatable. we set up one for all scripts that no script has
|
||||
@@ -520,8 +516,7 @@ void lua_scripts::run(void) {
|
||||
|
||||
if (option_is_set(AP_Scripting::DebugOption::RUNTIME_MSG)) {
|
||||
const int loaded_mem = lua_gc(L, LUA_GCCOUNT, 0) * 1024 + lua_gc(L, LUA_GCCOUNTB, 0);
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_DEBUG, "Lua: State memory usage: %i + %i\n",
|
||||
inital_mem, loaded_mem - inital_mem);
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_DEBUG, "Lua: State memory usage: %i\n", loaded_mem);
|
||||
}
|
||||
|
||||
// Scan the filesystem in an appropriate manner and autostart scripts
|
||||
|
||||
Reference in New Issue
Block a user