Examining applications that do not terminate on std::bad_alloc
summary
Examines how over 300 open-source C++ projects explicitly handle std::bad_alloc, identifying the real causes of allocation failures (not always low memory) and cataloguing the concrete response strategies beyond immediate termination, using RAII-based resource handling as the framework for analysis.
AI-written summary · about
chapters (15)
- 0:00Start
- 2:11Common wisdom
- 2:36What does "Out of memory" mean?
- 3:12The fork/exec problem
- 4:08Overcommit
- 5:24Bad allocation is not always OOM
- 6:59"One Bug To Rule Them All" (GSEC-TZO-44-2009 aka CVE-2009-1692)
- 8:43178 (46%) Somebody else's problem
- 10:46Somebody else's problem 16 (4%) Rethrow as-is
- 11:0782 (21%) Cleanup and terminate
- 16:3825 (69) Unit tests
- 17:27C++ OOM Case study: Office applications
- 18:25C++ OOM Case study: Web browsers
- 19:14C++ OOM Case study: Databases
- 20:12Handling allocation failure
related talks
01h 02mBack to Basics: Exceptions
01h 02mPractical Memory Pool Based Allocators For Modern C++
57m“The Unexceptional Exceptions"
44mA Practical Approach to Error Handling
57m“An allocator model for std2”
30mDesign Patterns for Handling/Reporting Errors in C++ - Parallel Algorithms & Executors
01h 33mSafe and Sane C++ Types
54mC++ Common Knowledge
