Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the concept of allocators as handles to heaps in C++ through this comprehensive conference talk from C++Now 2018. Delve into the std::pmr framework introduced in C++17, understanding how std::pmr::polymorphic_allocator works with std::pmr::memory_resource. Discover the true meaning of the Allocator concept, tracing its evolution since C++98. Learn about the implications of viewing allocators as lightweight, efficiently copyable handles, including the impossibility of implementing an "in-place" std::vector using allocator tricks. Examine non-standard examples of Allocator types, such as shmem_allocator and shutdown_safe_allocator. Explore topics like the behavior of moved-from allocator objects, relationships between allocators and concepts like façades and adaptors, and potential similarities between allocator/heap and executor/execution-context pairs. Gain insights into designing efficient and effective memory management systems in C++.
Syllabus
Intro
Objects and Values
Object Identifiers
Two Ways of Looking
Questions
The Allocator
Stateful Allocators
Polymorphic Allocators
Allocators
Stateless Alligator
Memory Resource
New Delete Resource
Polymorphic Allocator
Copyable Alligator Types
Rebinding Alligator Types
Rebinding Template Parameters
Other Rebinding Template Parameters
Designing the SQL today
Taught by
CppNow