[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Memory Problem with Lua 3.0
- From: "Ralf HECKHAUSEN" <RHeckhau@...>
- Date: Fri, 10 Apr 1998 11:38:36 +0200
>>>> David Jeske <email@example.com> 9.4.98 19.17 >>>
>On Thu, Apr 09, 1998 at 12:23:04PM -0300, Ralf HECKHAUSEN wrote:
>> Hi Luiz,
>> We are calling one function periodically from the C-application, which causes
>> a memory overflow after a few hundred calls. I switched on the debug mode in
>> luamem.c and recognized, that the memory usage grows over the long run. The
>> number of blocks and kb mem oscilate widly over the time, while the average
>> value of blocks is constant, but the mem value grows.
>Have you called "collectgarbage()" with a finite number? Try calling it with a
>number like "2" and see if your memory problem goes away.
Yes, I tried this, but It did not have any impact on my problem. But just in the
moment I seem to have found a solution: I do not use lua_dostring(<function call>)
anymore, but use lua_callfunction(lua_getglobal(<function name>)) after pushing the
I recognized, that dostring always claims new memory, when it is called with a new
string, in my case, when a parameter in the function call changed.
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + firstname.lastname@example.org