If your add-on uses LuaJIT (e.g. via SASL, Gizmo, FlyLua, or directly) then this tool may help.  It’s a special build of X-Plane 10.21 for 64-bit Mac that can show total Lua memory use.  Use DataRefEditor and filter on “lua” to see the numbers.

Since Lua uses garbage collection, you’ll see the number rise up and then “fall” periodically as garbage gets cleaned up.  Non-Lua allocations by plugins are not counted.

If you use LuaJIT in your add-on (or a plugin that uses LuaJIT), please try to keep the amount of Lua memory used below 300 MB or so – more is available, but if you use it all, your plugin won’t inter-operate with other plugins.

About Ben Supnik

Ben is a software engineer who works on X-Plane; he spends most of his days drinking coffee and swearing at the computer -- sometimes at the same time.

3 comments on “Aircraft Authors – View LuaJIT Memory Usage

    1. Hi Jack,

      It’s only available on platforms where X-Plane manages LuaJIT memory. So for now it’s Mac 64-bit — eventually it will be all 64-bit OSes as we take over memory management everywhere.

      cheers
      ben

Comments are closed.