~/talk

How to Write a Custom Allocator

Talkat CppCon 2017 · 2017-09-24..09-29· [c-and-cpp]
links:none on file
slides:none on file

Explains how to implement C++14/17 allocators by showing the exact plumbing: required member functions (value_type, allocate, deallocate, converting ctor), how allocator_traits and pointer_traits synthesize missing types, and when containers call select_on_container_copy_construction or rely on polymorphic memory_resource. Covers synthetic pointers for shared memory, PMR-derived resources like monotonic_buffer_resource, propagation flags (propagate_on_move_assign, is_always_equal) and why PMR is usually the simpler starting point.

AI-written summary · about

  1. 0:00Introduction to custom allocators
  2. 1:05What is an allocator?
  3. 6:24Why write a custom allocator?
  4. 12:25History of allocators
  5. 18:32Modern allocator facilities
  6. 27:18Allocator traits explained
  7. 36:59Pointer traits and fancy pointers
  8. 43:55Minimal allocator interface
  9. 46:51Polymorphic memory resources
  10. 52:10Writing allocator-aware containers
  11. 58:20Guidelines for allocator design
  12. 1:01:40Summary and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.