Skip to content
Matthew Wild's lua-getsize module as a rock
C C++ Lua Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis @ 65c17cc
ljdetect
lua5.1
lua5.2
lua5.3
rockspecs
tests
.gitignore
.gitmodules
.travis.yml
README.md
compat.c
compat.h
compat_50103.c
compat_50200.c
compat_50204.c
compat_50300.c
compat_50301.c
compat_50302.c
compat_50400.c
getsize-scm-0.rockspec
getsize.c

README.md

Build Status

lua-getsize

This is a bundle of Matthew Wild's lua-getsize module with the necessary bits from Lua's sources (5.1, 5.2, 5.3, and 5.4) included to make it build as a standalone rock.

lua-getsize is MIT/X11-licensed. Lua's source code is available under the MIT license.

http://code.matthewwild.co.uk/lua-getsize/
http://www.lua.org/

At the moment the code in this repository includes the following changes to the original lua-getsize code:

  • ported to Lua 5.2, 5.3 and 5.4
  • fixed sizes of tables with empty hash part
  • report a userdata's full memory not just its payload
  • detect LuaJIT and raise an error
  • additionally report the sizes of a table's array/hash parts
  • additional option argument for counting shared internal objects like Lua upvalues and/or proto objects. "p" will count proto objects, "P" will not count proto objects (the default), "u" will count Lua upvalues (the default), and "U" will not count Lua upvalues. You can combine those options.
You can’t perform that action at this time.