lua-users home
lua-l archive

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


How about just hooking into the Lua memory allocator, and if a certain size object is requested, you'd be looking them in the C-side cache. If sizes are other, you'd pass it on to 'realloc()' as usual.

I should probably have explained that I already have a very fast (slot based) memory allocator, so it is not really the realloc() time that is hitting me. Rather, it is the time in the garbage collector. Since so much garbage is being created I have to spend a lot of time doing garbage collection, otherwise the memory use of the process runs amok.

// Niklas