[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: GC/memory stats?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 26 Aug 2002 09:32:13 -0300
> How can I know (in Lua 4.0) about currently allocated memory and space
> remaining before the next GC happens? (or equivalent info)
`lua_getgccount' returns the number of Kbytes currently allocated by Lua.
`lua_setgcthreshold' returns the number of Kbytes "available" until the
next GC cycle (that is, when lua_getgccount() >= lua_setgcthreshold(),
Lua triggers the GC). (In Lua both values are returned by `gcinfo').
-- Roberto