lua-users home
lua-l archive

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


paul@theV.net wrote:
Is this considered ordinary? How do I avoid lots of fragmentations? My
game is using lua scripts extensively, including many non-permanent
small string, small table and closure creation in every frame cycle.

It you grab the latest F4 snapshot (located at http://www.379.com/f4), you can pull out the memory manager I'm using. It "pools" < 4K allocations together into larger pages, avoiding memory fragmentation. You can also see how I patched the Lua code to use it. It's also a lot faster than the std mem operators. I don't notice the Lua gc blips in my development code any more, though I'm still scaling up the content.

Jason
379