std.allocator ready for some abuse

John Colvin john.loughran.colvin at gmail.com
Thu Oct 24 14:57:22 PDT 2013


On Thursday, 24 October 2013 at 19:53:56 UTC, Andrei Alexandrescu 
wrote:
> Hello,
>
>
> I know it's been a long wait. Hopefully it was worth it. The 
> alpha release of untyped allocators is ready for tire-kicking 
> and a test drive.
>
> Code: 
> https://github.com/andralex/phobos/blob/allocator/std/allocator.d
>
> Dox: http://erdani.com/d/phobos-prerelease/std_allocator.html
>
> Warning: this is alpha quality. Unit tests are thin, and there 
> are no benchmarks. Both would be appreciated, particularly 
> benchmarks to validate the gains (which I speculate can be very 
> sizable) of custom-built, special-purpose allocators compared 
> to traditional allocators.
>
> I acknowledge I'm clearly in no position to evaluate this 
> design. I have been knocking around it for long enough to have 
> no idea how easy it is to get into it from the outside, or how 
> good it is. By all signs I could gather this feels like good 
> design, and one of the best I've ever put together. The 
> allocators defined have an archetypal feeling, are flexible 
> both statically and dynamically, and morph and combine in 
> infinite ways.
>
> CAllocator and CAllocatorImpl make the link between the static 
> and dynamic worlds. Once an allocator is assembled out of 
> pieces and finely tuned, wrapping it in a dynamic API is a snap.
>
> Please destroy! I've literally sweat as I'm sending this :o).
>
>
> Andrei

I'm nowhere near experienced enough to comment on how good this 
really is, but it sure looks like an impressive design. 
Congratulations :)


More information about the Digitalmars-d mailing list