Skip to content

sundream/lua-snapshot

 
 

Repository files navigation

lua-snapshot

Make a snapshot for lua state to detect memory leaks.

See dump.lua for example.

Build

make linux

or

make mingw (in windows)

or

make macosx

Test

lua53.exe dump.lua

Format

if you use snapshot_utils.diff(S1,S2,pretty) with argument pretty=true,the format is below:
address+id [address]
       +type [table/function/userdata/thread]
       +tablecount [table's count]
       +source [function/thread defined location,e.g: short_src:linedefined]
       +refcount [refrence count]
       +reflist+1 refpath
               +2 refpath
               ...
refpath: is a shortest reference path,seperate by '.'
_M : main thread
_G : global table

About

Make a snapshot for lua state to detect memory leaks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 62.1%
  • HTML 34.7%
  • Makefile 1.1%
  • Lua 1.1%
  • Roff 0.7%
  • CSS 0.2%
  • Other 0.1%