[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Memory usage stats for 5.2 vs 5.3
- From: Tom Sutcliffe <tomsci@...>
- Date: Tue, 13 Jan 2015 09:27:08 +0000 (GMT)
On 13 Jan, 2015,at 12:54 AM, Sean Conner <firstname.lastname@example.org> wrote:
One question---does your allocator just assign the next available free
spot? And is free() implemented? To me, the difference can be explained by
Lua freeing some garbage that isn't reflected in your custom allocator.
The placement algorithm is a little smarter than simply 'next free spot’ in an effort to reduce fragmentation. It maintains a free list of deallocated cells, so it does implement free() properly. Trust me, when it doesn’t everything blows up very quickly with this little RAM! I’m pretty sure of the allocator’s correctness, even though the fragmentation behaviour could probably be improved.