lua-users home
lua-l archive

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


On Nov 02, 2002 at 03:59 -0800, James McCartney wrote:
> 
> On Saturday, November 2, 2002, at 01:39  PM, Thatcher Ulrich wrote:
> 
> >This is cool, but one problem I have with this is that unless you
> >sweep, the "free" objects don't get returned to the C allocator (you
> >don't call C's free() on them).  Then, when you go to allocate new
> >objects, the "free list" is essentially an unsorted bag of
> >different-sized chunks.
> 
> It is not "an unsorted bag of different-sized chunks."
> The treadmills are segregated into size classes.

Sorry, my mistake.  I suppose you can always keep a count of free
chunks and sweep if it grows too big, to avoid consuming too much of
the C heap.

-- 
Thatcher Ulrich
http://tulrich.com