Lua C API utility to get all living objects and references in Lua.
- Based on Lua 5.3.5.
- The total size of all objects is exactly the same with the size returned by
lua_gc. - Changes in Lua source code:
- Add
nliveupvalfield inlua_Stateto record allocatedUpVal. - Make static function
index2addrpublic. - Add a new API
lua_memory_snapshotto get snapshot.
- Add
- Call
lua_memory_snapshotand collect objects and references in callback. - Dump all objects or build object tree with collected data.
Check example/snapshot.csv for example of dumped data.