Frictionless Allocators

By Alisdair Meredith

The benefits of users taking control over their own memory allocation strategy have been demonstrated many times at previous ACCU conferences. However, despite these benefits and ongoing support in the C++ Standard, allocator aware software has not yet become widespread throughout the C++ community.

One of the main sources of resistance is perceived complexity when providing allocator support in our libraries, which is the prerequisite for empowering users to make choices optimal to their circumstances. This talk will tackle that complexity head-on, seeking to remove the friction between library support and user.

First, we will examine the sources of friction when writing allocator awre code in C++ today. Then, we will then suggest a small selection of potential language extensions that would permit much cleaner expression of the same designs deployed today. We aim to take the friction out of the system!

This talk provides an early preview of several language proposals we hope to send to the ISO C++ committee for C++23 and beyond; it will touch on lessons learned from an early prototype implementation; and we will discuss how to judge when the proposal and experience with it are mature enough to take up valuable committee time to move forward!