[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: "Bogdan Marinescu" <bogdan.marinescu@...>
- Date: Fri, 2 May 2008 19:04:22 +0300
> 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."