~/talk

Allocators: The Good Parts

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

Argues that C++17’s pmr model makes allocators practical, showing how to derive a memory resource (override do_allocate/do_deallocate/do_is_equal), wrap it in polymorphic_allocator<std::byte>, and build an allocator-aware singly linked list. Demonstrates a test resource that records allocations, deallocations and high-water marks, and a push_back that produces two allocations (node + string buffer). Explains available resources (new_delete, null, synchronized_pool, monotonic_buffer) and when chaining or throwing on exhaustion is useful.

AI-written summary · about

  1. 0:00Introduction and thesis
  2. 1:27Why allocators exist
  3. 4:43Historical complexity of allocators
  4. 13:20Scoped allocator model
  5. 19:11Polymorphic allocator of byte
  6. 24:58Building a new memory resource
  7. 39:13Building a container with allocators
  8. 55:50Live code demo
  9. 59:49Conclusion and summary
~/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.