Re: Fragmenting memory



Replacement MM's all tend to deal with this problem and use a more
complicated internal structure to help prevent fragmentation

Complexity is a matter of point of view, but the segregated approach used from RecyclerMM to BucketMem and FastMM actually looks a lot more simpler to me than the linked-list heaps strategies used by the Borland MM or other "classic" C allocators.

Most of the complexity in latest FastMM4 f.i. comes from optimizations,
security and debugging additions, but the base algorithm implementation
is very straightforward (and already performs better than Borland MM
performance, fragmentation and stability wise).
You get what you pay for though, segregated approach has a higher up-front
memory usage, which would have made it rather inefficient in the 640 kB
of RAM days. But when you start using dozens of megabyte, that overhead
becomes negligible.

Eric
.