Containers, Allocators and Purity

Nordlöw via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Mar 24 04:18:06 PDT 2016


Could somebody briefly outline how the thread-locality 
(non-GC-locked) of allocators  relates to the purity of the 
containers using them?

This because I want to move forward with optimizations in my 
knowledge graph that requires GC-free array containers storing 
value typed elements (integers) which preferrably has pure API.

Specifically, I want to use something like

https://github.com/economicmodeling/containers/blob/master/src/containers/dynamicarray.d

that is `@safe pure` and uses lock-free allocations in a heavily 
multi-threaded application.

If I want purity aswell which `std.experimental.allocators` are 
possible?


More information about the Digitalmars-d-learn mailing list