[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Question about Lua 5.1.3 and realloc() on life.lua
- From: Mike Pall <mikelu-0805@...>
- Date: Fri, 2 May 2008 18:38:24 +0200
Bogdan Marinescu wrote:
> > Umm, reinventing the wheel? And why do so without studying the
> > literature? There's plenty out there and it will tell you that
> > best-fit is rarely a good choice. While it has the least amount of
> > internal fragmentation it causes the highest amount of external
> > fragmentation and has unacceptable worst-case behaviour.
> By the way, best-fit is probably the best choice for such a simple
> allocator. As Doug Lea himself suggests:
>
> "As shown by Wilson et al, best-fit schemes (of various kinds and
> approximations) tend to produce the least fragmentation on real loads
> compared to other general approaches such as first-fit."
Severe case of terminology mixup. I was referring to 'sequential
best-fit'. Given the context, the quote probably refers to
'segregated fit' (derived from best-fit) since dlmalloc is a
deferred coalescing segregated fit allocator.
I suggest to follow the taxonomy in:
http://citeseer.ist.psu.edu/wilson95dynamic.html
--Mike