lua-users home
lua-l archive

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

Byron Guernsey wrote:
> I've noticed the memory footprint of the game engine grows with time
> and the games that execute Lua scripts frequently, grow much more
> quickly in size. The rest of the code has been checked extensively
> with BoundsChecker and has no notable memory leaks.

Iirc there was something to consider when compiling a lot of small
temporary chunks: the compiler assumes that the code will be kept
some time and increases the GC limit by the amount of memory used
by the new code (see ldo.c:protectedparser).  This may result in
no GC runs if the chunks do nothing exciting memory wise.

Calling collectgarbage(0) sometimes should clean things up.

Ciao, ET.