Loading…
CppCon 2019 has ended
Thursday, September 19 • 16:45 - 17:45
test_resource: The pmr Detective

Log in to save this to your schedule and see who's attending!

This session will provide an introduction to pmr::test_resource, which supports testing memory allocation related behavior on a per-object basis. pmr::test_resource is a C++17 memory resource designed for testing that can be plugged into any test framework. It is the modernized version of the bslma::TestAllocator used in production for over two decades at Bloomberg, where it has helped to expose a variety of bugs, such as memory leaks, overruns, multiple deletes, exception-safety guarantee failures etc.

This presentation will show the use of test_resource in detecting errors related to memory allocation. We walk through code to demonstrate several bugs and show how they misbehave, how we diagnose them, and a reasonable fix. pmr::test_resource is being proposed for the Library Fundamentals 3 TS and full source code for test_resource, bslma::TestAllocator and the examples is available on GitHub.

Speakers
avatar for Attila Fehér

Attila Fehér

Senior software engineer, Bloomberg LP
Working with C++. Original proposer of the C++11 alignment features.


Thursday September 19, 2019 16:45 - 17:45
Summit 6/7

Attendees (37)




Twitter Feed