Full Memory Dump

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
Party member
Posts: 1931
Joined: Mon Jun 17, 2013 12:00 pm

Full Memory Dump

Post by raidho36 » Thu May 09, 2019 2:39 pm

Here's a script to dump the entire Lua state memory into a text file. It handles circular dependencies and metatables, function upvalues and local variables for currently running functions. You can use it to create crash dumps, and with a custom tool you can analyze the memory and try to figure out what caused the crash. For every function, it displays all available information (where it's defined, etc), it's upvalues and locals. For every table, it displays its metatable in parenthesis and dumps key-value pairs. For userdata, it displays its metatable (userdata doesn't have its own data). And for cdata, well, it just shows that it's there, because no information is accessible about it.
(2.55 KiB) Downloaded 118 times

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests