lua-users home
lua-l archive

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


Sebby wrote:
> 
> Basicaly, you'd need to split up the marking and the collecting
> parts.

It's already split.  Just add marking of all stacks in markall.

> In my case it's somewhat easier since i set the gc limit
> so it doesn't do automatic collection. Since i'd be using this for
> video games, i don't want to have stalls due to gc at random points
> in time, so i'll do the gc manually when i feel it will not cause any
> speed issues (changing levels, opening up a menu, ...)

I hope you know what you're doing.  Delaying gc multiple minutes may
generate a _huge_ heap if Lua is really used.  You have to program
really careful with such long gc-delays (basically you have to avoid
generating temporary objects).  It may be even better to call the gc
every frame to have a pretty short gc-run.

Ciao ET.