Over 10 years ago I wrote a tiny C module that allowed you to get
the size of a Lua object in bytes. This was quite handy for debugging
memory usage, especially when used in combination with luatraverse,
originally written by Alexandra Barros back in 2006.
Unfortunately both projects were developed for 5.1 and don't work
(correctly) under more recent Lua versions.
I don't currently have the time to update either project. But I
wondered if anyone in the community had any alternative code for doing
the same, would feel inclined to spend some time on this for the good
of the community? <3