lua-users home
lua-l archive

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

On Wed, 2005-01-12 at 16:46, William Ahern wrote:

> Of course, this is all conjecture and using malloc(3) and free(3) directly
> will probably suffice.

They're probably be more efficient than anything 
you design. I too have been tempted to write suballocators,
but I suspect that other than very special cases,
the system allocators are very good these days.

In addition GC may recycle blocks already, on top
of raw allocations, so adding yet another layer seems
likely to cost more than it saves (not to mention
the programming effort).

Hmm .. is there an option to just 'junk' the whole
of memory for a Lua state without bothering with
finalisation? In that case no collection is needed,
just delete everything on the free list without a sweep.

This could save considerable time on termination.
[Especially for small scripts that happily spew garbage
without ever doing a collection, and then terminate]

John Skaller,
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language