[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Garbage collection of function tables
- From: Ralph Hempel <rhempel@...>
- Date: Sat, 28 Mar 2009 08:32:59 -0400
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:
string=nil
table=nil
debug=nil
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?
Ralph