[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 5.1 (work0)
- From: Asko Kauppi <asko.kauppi@...>
- Date: Thu, 25 Mar 2004 23:07:36 +0200
FYI, I've upgraded LuaX (now 0.69i) to using Lua 5.1-work0.
The only problem I faced was doing a default 'make' on OS X, where you
first need to remove earlier installed liblua.a versions. This has been
reported to lhf.
Running selftests and demos, I'd say it works more smoothly than 5.0.1
(but I haven't made scientific proof :). Especially the SDL
MeteorShower game is good in seeing GC effects (thanks, Thatcher,
25.3.2004 kello 14:58, Roberto Ierusalimschy kirjoitti:
Roberto will probably post more details on what we need.
As lhf pointed out, the main purpose of this release is to start an
evaluation of the incremental GC. It is up and running, but there
are lots of work to be done.
First, we need to know whether it is incremental enough for people that
need an incremental GC. We can only find this by tests with actual
Second, we need more tests for bugs. We eliminated all bugs that we
but among the bugs that can flourish in such collector there are
that are quite hard to appear.
A big question that remains is how to control the pace of the
If the collector runs to fast, it wastes time; if it runs too slow, it
wastes memory. Again, we need real data to better understand this
There is a single function to control GC, with an argument that tells
what to do. (We chose that design because we have no idea what the
options would be.)
lua_gc(L, LUA_GCSTOP, 0) --> stops the collector
lua_gc(L, LUA_GCRESTART, 0) --> restart
lua_gc(L, LUA_GCCOLLECT, 0) --> perform a whole collection
lua_gc(L, LUA_GCCOUNT, 0) --> returns number of bytes allocated
You can do the same in Lua:
collectgarbage("collect") (equivalent to collectgarbage())