lua-users home
lua-l archive

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


Sorry by the comment LHF, but PLua is also the name of one famous port of Lua to the PalmOS. :)
J. Machado
machado@palmcon.com.br

Thanks to Marcio Migueleto. Luiz Henrique de Figueiredo escreveu:
Motivated by the post by André de Leiradella on using GNU mmalloc with Lua,
I've packaged some code for those who want to try it with minimal hassle:
	http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/plua.tar.gz
The code is mainly a redefinition of lua_open, lua_close, l_realloc, and l_free
to use routines in mmalloc. It also shows what can be done without touching
Lua's source code. See the Makefile.
Simple examples work ok. One issue is the registration of C functions: correct
behaviour seems to rely on the interpreter registering all C function again
at each invocation. Of course, it does that for the standard libraries, but
storing a C function in a table field in one instance and them trying to run
it in a later instance may not work. André has experimented with proxies for
C functions and it seems to work, but the package above does not include this;
it is mostly for those who want to play with it -- persistent states does add
a new perspective and will be really useful if it can be made to work well.
Those interested in mmalloc should read
http://sources.redhat.com/gdb/5/onlinedocs/mmalloc.html
Enjoy.
--lhf