lua-users home
lua-l archive

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


Sorry Chris, but was this an answer/follow-up to what I have said?

I'm using the groups through Mozilla Thunderbird by the gmane.comp.lang.lua.general but sending my reponses back to lua-l@lists.lua.org

Anyway - no big deal, just bit confusing.

On 7/28/2011 9:54 AM, Chris Gagnon wrote:
I would suggest changing the default GC values.
In my experience in a high throughput system with limited memory the
defaults don't keep up.

I use:
lua_gc(m_pLuaState, LUA_GCSETPAUSE, 90);
lua_gc(m_pLuaState, LUA_GCSETSTEPMUL, 200);

This is quite aggressive but i have limited memory, and many scripters
trying to eat it all. ;o)

- Chris

On Wed, Jul 27, 2011 at 7:14 PM, Dimiter 'malkia' Stanev
<malkia@gmail.com <mailto:malkia@gmail.com>> wrote:

    Btw, to disable that and still run/debug from Visual Studio, one can
    add this environment variable the project:

    _NO_DEBUG_HEAP=1

    http://msdn.microsoft.com/en-__us/library/aa366705(v=vs.85).__aspx
    <http://msdn.microsoft.com/en-us/library/aa366705(v=vs.85).aspx>


    On 7/27/2011 10:59 AM, Patrick Rapin wrote:

            I did some load tests on a lua program (a *C* program that
            uses different
            Lua VMs, each on its own thread) and I've seen memory
            increasing to around
            1Gb (possibly my Window's memory limit or something), and
            then falling
            quickly to 64Mb or so.


        Just to be sure: you are not running your program using Visual
        Studio
        in "Debug" mode, right?
        Because in this case, the memory consumption can grow up *much*
        higher
        than in Release mode.
        In Debug mode, to help debug memory related errors, "free" and
        similar
        functions do not return blocks to the system.
        So the application memory footprint can only grow over time. Or so I
        have observed.