C++Now 2017 has ended
Back To Schedule
Thursday, May 18 • 4:30pm - 6:00pm
Testing the Limits of Allocator Awareness

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
Slides: https://github.com/boostcon/cppnow_presentations_2017/blob/master/05-18-2017_thursday/testing_the_limits_of_allocator_awareness__bob_steagall__cppnow_05-18-2017.pdf
Video: https://www.youtube.com/watch?v=fmJfKm9ano8

One of the lesser-known improvements in modern C++ is support for so-called "allocator-aware" containers in the standard library. With this support, it is now possible to create and use allocators that are stateful, as well as allocators that employ synthetic pointers to perform addressing operations. While most C++ programmers will never need such arcane constructs, there is a small class of problems where they can have a significant positive impact on performance and quality of implementation.

This talk will address two broad questions. First, how well do the standard libraries in recent versions of the most common C++ compilers (Clang/GCC/MSVC) conform to the requirements for allocator-aware containers? Second, what are the expected and measured performance implications of using stateful allocation strategies and synthetic pointers with the library implementations provided by these compilers?

To answer these questions, this talk will first review the old C++03 allocator requirements and the limitations they imposed on the design of custom allocators. We'll then examine the new allocator requirements in C++14 and their implications for library users, library implementors, and custom allocator implementors. Next, we'll discuss the design and goals of a suite of custom allocator components constructed to test the conformance and performance of library implementations. Following that, we'll dig into the important design and implementation details of those allocator components and how they are used as policy types for a high-level allocator class template. The talk will then describe the methodology for conformance and performance testing and summarize test cases for each. Finally, the test results will be presented and discussed.

avatar for Bob Steagall

Bob Steagall

CppCon Poster Chair, KEWB Computing
I've been working in C++ since discovering the second edition of The C++ Programming Language in a college bookstore in 1992. The majority of my career has been spent in medical imaging, where I led teams building applications for functional MRI and CT-based cardiac visualization... Read More →

Thursday May 18, 2017 4:30pm - 6:00pm MDT