lua-users home
lua-l archive

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


Adam D. Moss wrote:
> It would help to explain why I ask: I was wondering whether it would
be a good idea to run a little GCSTEP every frame of a game, since my
lua-side memory usage in 5.1 is about 3x as large as in 5.0 so I assume
lua5.1 would benefit from these extra slices of collection time in my
particular app.

We do this in our game, and it works well (it definitely helps keep the
memory high water mark down).  We run it for 2 steps per frame, but
we've also tweaked some of the GC parameters to make the GC more
aggressive.  (I submitted GCSTEP and our GC parameters as a patch to
5.1w0, but I haven't looked at the subsequent releases so I'm not sure
if those new parameters were accepted along with GCSTEP).

Cheers,
Jasmin