lua-users home
lua-l archive

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


On 13 Jan, 2015,at 12:54 AM, Sean Conner <sean@conman.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 doesnt everything blows up very quickly with this little RAM! Im pretty sure of the allocators correctness, even though the fragmentation behaviour could probably be improved.

Cheers,

Tom