lua-users home
lua-l archive

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


Has anyone instrumented Lua to see what block sizes are common? Or is this
likely to vary from project to project? I'm thinking that a sub-allocator
for the common cases (or at least a free list) could be a significant win.

Mark

on 7/7/05 5:43 PM, Luiz Henrique de Figueiredo at lhf@tecgraf.puc-rio.br
wrote:

>> I wonder if it'd be a win, for allocation speed and memory fragmentation,
>> if Lua could be convinced to hook into C++-style allocation through
>> callbacks.
> 
> I'm not sure what you mean, but memory allocation in 5.1 is through callbacks.
> In 5.0 you can compile Lua to use your own allocation routines, which use
> the same interface (ie, get the old size).
> --lhf