lua-users home
lua-l archive

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


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

You are not talking about Lua VM instruction pointer, are you? That is, if one had saved in the suggested fashion Lua VM with a few yielded states in it, it would be possible to resume them after loading that VM back, would it not?

On a side note, this method of serialization would produce platform dependent files... right?.

Alex

>-----Original Message-----
>From: Luiz Henrique de Figueiredo [mailto:lhf@tecgraf.puc-rio.br]
>Sent: Thursday, May 06, 2004 1:49 PM
>To: lua@bazar2.conectiva.com.br
>Cc: leiradella@bigfoot.com; hpa@zytor.com
>Subject: RE: lua state
>
>
>>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.)
>
>
>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
>
>