lua-users home
lua-l archive

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


On Tue, 5 Feb 2002, Russell Y. Webb wrote:

> Have you looked to see if the number of Lua owned blocks is going up during
> execution?  In debug mode lua keeps a count and mem size (see lmem.h):
> #ifdef LUA_DEBUG
> extern unsigned long memdebug_numblocks;
> extern unsigned long memdebug_total;
> extern unsigned long memdebug_maxmem;
> extern unsigned long memdebug_memlimit;
> #endif

You do not need LUA_DEBUG for that. Function `gcinfo' returns the amount
of memory used by Lua (in Kbytes).

-- Roberto