lua-users home
lua-l archive

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

>From: Jim  Mathies <>
>Well, here is a related question - if the Lua VM get's terminted mid
>process, without any warning, will it leave allocated memory behind?

"Terminated" in what way?
Lua allocates memory (for runtime and other things) dynamically as needed,
sometimes even *reducing* the size of buffers.
However, the only way to freea *all* allocated memory is to use lua_close.

>> Jim  Mathies <> wrote:
>> > Do you know of any way to interrupt the running VM by making a call
>> > into it while a separate thread is executing a program?
>> There's no way to do that using the standard Lua distribution.

You may try to set the call hook and then call error inside it.
I think this will interrupt the current chunk.