~/talk

Embedded: Customizing Dynamic Memory Management in C++

Talkat CppCon 2020 · 2020-09-14..09-18· [embedded-and-hardware]
name:Ben Saks
links:none on file
slides:none on file

Shows how to replace global and per-type allocation by defining class-specific operator new and matching deletes, including the no-throw overload, and how the compiler pairs new/delete when constructors throw. Demonstrates a simple fixed-size free list allocator: a static array of same-size blocks linked at startup, O(1) alloc/free, deterministic and fragmentation-free for that type. Covers alignment via alignof and unions, array new/delete caveats, and a tiny leak counter example.

AI-written summary · about

  1. 0:00Introduction
  2. 2:58Storage duration types
  3. 6:21New and delete mechanics
  4. 8:28Compiler generated code
  5. 10:38Checking for null pointers
  6. 12:06Operator new and delete
  7. 13:55Replacing operators
  8. 16:07Custom tracking allocator
  9. 18:21Multiple operator versions
  10. 20:08Arguments to operators
  11. 22:11Global manager challenges
  12. 25:15Pool allocator strategy
  13. 27:35Class specific operators
  14. 29:42Inheritance considerations
  15. 31:07Static member functions
  16. 32:37Memory resource use
  17. 34:28Virtual destructor roles
  18. 36:02Pool allocator implementation
  19. 37:47Deterministic performance
  20. 39:45Managing available blocks
  21. 42:01Storage alignment issues
  22. 44:00Modern alignment techniques
  23. 46:14Pointer casting
  24. 47:20Array allocation
  25. 48:50Array management challenges
  26. 50:44Exception handling in embedded
  27. 51:53No throw operators
  28. 53:44Safe exception handling
  29. 55:52Operator pairing
  30. 57:46Conclusion
~/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.