www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - The Kernighan-Ritchie allocator is back with a vengeance

I just updated the Kernighan-Ritchie allocator, including documentation:

It's not a high performance allocator. Initially I'd implemented it just 
for historical perspective and to make sure the allocator API is 
expressive enough to do it justice.

However, a simple idea makes it competitive: rig it to work as a region 
allocator first, classic KR allocator when the region is exhausted. This 
makes for a highly recommended "region with deallocate".

More detail in the docs at 
http://erdani.com/d/phobos-prerelease/std_experimental_allocator_ker
ighan_ritchie.html. 
Code at 
https://github.com/andralex/phobos/blob/allocator/std/experimental/allocator/kernighan_ritchie.d.


Andrei
Jun 02 2015