lua-users home
lua-l archive

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


Hello,

We are experiencing a problem with Lua 3.2 Multistate in an embedded
environment when we use the io_open and subsequent io_close calls. Memory
blocks get allocated during the io_open call, but not all of them get freed
when the io_close call completes, or after garbage collection. Prior to and
after executing the script we perform garbage collection, and we have
beginblock and endblock calls around the execution of the script. We believe
the memory blocks that do not get freed might be related to user tags.  

We read about a similar case (not necessarily related to io_open) in the
mailing list archive, but the author said he originally called the lua
function using lua_dostring and corrected it by using lua_callfunction. We
are already using lua_callfunction. Do you have any suggestions as to what
we might be doing wrong, or what we might be able to do to ensure that these
blocks get freed after we've completed execution of the script?

For our embedded application, Lua runs continuously and does not get closed,
so even though we have proven to ourselves that these blocks can be freed by
closing Lua, it would not work for our application.

Thank you in advance for your assistance.

Heather A. Whitefield
hwhitefield@tollgrade.com