lua-users home
lua-l archive

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



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, again!)

-ak


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
applications.

Second, we need more tests for bugs. We eliminated all bugs that we found, but among the bugs that can flourish in such collector there are several
that are quite hard to appear.

A big question that remains is how to control the pace of the collector.
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 point.

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 final
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("stop")
  collectgarbage("restart")
  collectgarbage("collect")  (equivalent to collectgarbage())
  collectgarbage("count")

-- Roberto