lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I was going through some testing to figure out how
much RAM a table of functions uses in Lua 5.1.4

For example, on my project, a bare bones Lua with
only the base table uses about 5K, according to gcinfo()

When I add the string, table, and debug libraries, the
RAM usage goes up to about 11K.

Setting each of these additional tables of functions
to nil, like so:


should (after forcing garbage collection) put the RAM
usage back down to about 5K.

Unfortunately, it's still about 11K. What am I not
understanding about garbage collection of unsused table
entries? Or are functions somehow special in how they are
dealt with?