Monday, February 9, 2009


csheap is a customizable dynamic memory allocator written in C. It was originally written as a replacement for the standard libc malloc and the Windows runtime.

I've put it up on Google Code here. Enjoy.

1 comment:

John said...

Thanks for CSHEAP. I'm going over it today and I really like how small and simple the code is.

Do you have more information about the strategy you employed for the implementation?

Isn't iterating through the 128 free-lists kind of slow? It doesn't appear to do anything in terms of power of two allocations, or special cases for small allocations?

How do you compare it to other allocators such as DLMALLOC for example?