~/talk

An allocator is a handle to a heap

Talkat C++Now 2018 · 2018-05-06..05-11· [c-and-cpp]
slides:none on file

Claims that an allocator can be a true handle to a heap versus merely carrying state and gives concrete code and runtime behavior: implements a PMR-like allocator whose value is a memory_resource pointer — value is a pointer to a heap and contrasts it with a conforming allocator whose value is a fill character — value is a fill character, not a heap handle. Demonstrates with struct padding and move tests and with two lists on different heaps that calling std::swap yields undefined behavior on swap and leads to deallocate-time crashes.

AI-written summary · about

~/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.