~/talk

test_resource: The pmr Detective

Talkat CppCon 2019 · 2019-09-15..09-20· [testing]
links:none on file
slides:none on file

pmr::test_resource is a C++17 polymorphic memory resource (based on Bloomberg’s bslma::TestAllocator) that detects leaks, buffer overruns/underruns, double frees and wrong-size/ alignment frees; it counts blocks/bytes, prints verbose allocation traces, and aborts on leak by default. Examples walk through a broken PString that misses a terminator, copy/move mishandles and a per-object exception injection loop that verifies strong exception safety using monitoring snapshots and a default-resource guard; full source and examples live on GitHub and are proposed for Library Fundamentals 3 TS.

AI-written summary · about

  1. 0:00Intro
  2. 7:50Design
  3. 9:28Functions
  4. 11:06Deck
  5. 12:21Memory Resource
  6. 14:50Polymorphic A Locator
  7. 19:07Test Resource Example
  8. 21:46Test Resource Implementation
  9. 26:10Memory Leaks
  10. 28:02Buffer Overrun
  11. 30:30Undefined Behavior
  12. 32:34Public Lead
  13. 34:13Vector
  14. 36:11Test
  15. 41:22Test resource
  16. 43:03allocations
  17. 48:29when to use
  18. 51:08call to action
  19. 52:46QA
~/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.