lua-users home
lua-l archive

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


Hi,

Im using LUA 4 in my server appz for processing of incomming data. For every incomming data Im pushing whole new pseudo userobject table with Cclosures of the real user-object methods and pointers to it's members. Every time Im pushing 'members' and 'methods' of the same name and in the same order but always for different C-object. Because the userobject table is created on the lua's stack, every new pushing allocates new strings of usertable entries (no stringtable entries are found) and because in most cases the appz serves more than thousands of requests per second, the windows heap memory suffers from high fragmentation after few days of uptime. Once I try
to disable the scripting, everything is ok.
Istead of pushing new userobject table uppon a new incomming data I would like to create a global table of the same structure for each lua_state and just update new c-closures for new data processing request and push that global table as a parameter for call to the script's ProcessData function.
Is it possible? And if yes, is there any recomended technique for such idea ?

Thanx in advance
Zdenek.