[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Hashing in Lua
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 04 Jul 2000 09:59:36 -0300
from "Nick Trout" <firstname.lastname@example.org>
> Does Lua do garbage collection at arbitrary intervals (eg. when it
> decides gc is appropriate) or must lua_garbagecollect(sp?) be called
> explicitly? I need Lua for realtime.
Usually Lua do gc at "arbitrary intervals" (when the total memory in use is
twice the memory in use just after the last gc), but you can change that.
When you call collectgarbage, you supply the number of "blocks" that Lua
will create before doing gc again (0 keeps the default). If you give a
large number (LONG_MAX, say), you will prevent any implicit activation of