CppCon 2016: Bob Steagall “Lightweight Object Persistence With Relocatable Heaps in Modern C++"

Play CppCon 2016: Bob Steagall “Lightweight Object Persistence With Relocatable Heaps in Modern C++"
Sign in to queue


Published on Oct 1, 2016

Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/cppcon/cppcon2016

Modern C++ brings many exciting and powerful advances to both the core language and the standard C++ library. Among these are changes to the standard allocator requirements that now permit allocators to allocate and deallocate blocks of memory that are addressable by generalized (i.e., non-native) pointers, as well as requirements for allocator-aware containers to employ such pointers.
This talk will describe a slightly different way of thinking about memory allocation, decomposing the idea into four distinct structural concepts – addressing model, storage model, pointer interface, and allocation strategy. To illustrate this new mental framework, we'll examine the design of a standard-conformant allocator that uses shared memory as its storage model, and show how it can be used to construct data structures based on standard C++ containers directly in shared memory. We'll then explore how this particular allocator's address-independent storage model supports a form of lightweight object persistence (with some constraints). Along the way we'll compare and contrast the old C++03 allocator requirements with those of C++14, and we'll also see at least one way to implement a generalized pointer. Finally, if time permits, we'll touch on other storage models and possible applications.
Bob Steagall
I've been working in C++ for the last 24 years. 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. After a brief journey through the world of DNS, I'm now trying my hand at analytics.

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com





Download this episode

The Discussion

Add Your 2 Cents