lua-users home
lua-l archive

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


> > >1. Is there profiling tool to check Lua memory footprint? 

Lua 4.0 has a new function `gcinfo'. Its first return is the current
memory usage of Lua. This value is a lower bound, usually within 5% of
the real value, and is expressed in Kbytes.

  > lua -e "print(gcinfo())"
  22	27

(the second result it the current threshold for GC).

(Unfortunately, this function did not find its way into the manual ;-)

-- Roberto