lua-users home
lua-l archive

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


>I need to serialize lua_state.

One simple way to do that is to use memory backed by a persistent file.

I experimented with this idea last year using GNU mmalloc:
	http://lua-users.org/lists/lua-l/2003-07/msg00251.html
but I did not find mmalloc stable. Probably just my fault.

Today I've found LPSM:
	http://freshmeat.net/projects/lpsm/
and it seems to work great! (I tested LPSM 0.1.11 on RH9 Linux.)

This scheme still does not save instruction pointers but you can stop a
Lua session and restart it later with all data intact.

For those who want to try it, get a version of lper at
	http://www.tecgraf.puc-rio.br/~lhf/tmp/lper.tar.gz

I'll do some more testing and if everything seems ok I'll make this the
official lper.

I wonder whether LPSM will run on other Unix platforms...
Also, if anyone here knows how to use GNU mmalloc well, please let me know.

Enjoy.
--lhf