Back to proposals-2013
Title: Allocators for Shared Memory in C++03, C++11, and Boost
Proposer: frank_birbacher
Type: Tutorial
Duration: 90 minutes
Description:
C++ allocators are rarely looked at but for using shared memory as a
means of interprocess communication they spring to mind. For a long time
this was a good idea in theory but in practice not until C++11.
Explaining allocators and their use case “shared memory” is the
focus of the presentation. Topics of the talk are the C++03 and C++11
allocators and the Boost.Interprocess library. It is shown how to
implement a custom allocator in C++03 and C++11 and how to employ Boost
in order to place containers like vector and set into shared memory.
The talk commences with the definition and limits of the C++03
standard allocators and why it does not permit portable use of custom
allocators for shared memory segments. The presentation continues with a
discussion of the Boost.Interprocess allocator for shared memory.
Examples will show the use of Boost containers in shared memory. Based
on this knowledge the talk presents the C++11 allocators, how to
implement a custom one, and how the latest standard enables new use
cases for custom allocators. Finally the shared memory examples are
reconsidered for comparing the old and new C++ standard.
Roger: Yes, unless we've got too much on C++11
Asti: Yep, sounds good