Designing and Implementing a new Allocator model
Judging by the recent amount of talks about the STL Allocator model it is a pretty well-known fact that is has some issues. This is a problem because allocators are essential for many performance demanding applications such as games. The STL model makes it awkward both to write own allocators and to use them in your code. So my talk is yet another of those talks where a better alternative is presented.
In this talk I take the Allocator model and improve it step by step until we reach something actually usable. Then we implement this model by the most common allocators. While doing so we discover a customization problem with arena allocators and solve it in a way that ensures a modular design and thus powerful composition. In the end we have a simple but powerful allocator model and various implementations. Everything I present here is already implemented in a library for you to use in your applications right now. It also comes with a supporting infrastructure and many wrappers to make integration as easy as possible.
memory library: https://github.com/foonathan/memory
- How I’ve beaten Boost.Pool - a series about optimizations:
- AllocatorAwareContainer: Introduction and pitfalls of propagate_on_container_XXX defaults