The Kernighan-Ritchie allocator is back with a vengeance

Andrei Alexandrescu via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 2 12:47:20 PDT 2015


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_kernighan_ritchie.html. 
Code at 
https://github.com/andralex/phobos/blob/allocator/std/experimental/allocator/kernighan_ritchie.d.


Andrei


More information about the Digitalmars-d-learn mailing list