C++ Exceptions
summary
Claim: using C++ exceptions can shrink large embedded binaries versus pervasive result-return checking. Evidence: recompiled ARM GCC with exceptions enabled, override terminate handler and replace __cxa_allocate_exception to avoid iostream bloat and heap, disable RTTI where safe, and link Picolib C; microbench RNG experiments show a crossover near ~550 checks and an MP3 project drops from ~60KB to ~49KB. Built a working ARM exception runtime and iteratively reduced its cost (now ~90+% smaller than GCC’s default).
AI-written summary · about
chapters (6)
- 0:00Introduction
- 5:19C++ exceptions in embedded
- 17:14ARM exception barriers
- 33:14ARM exception handling
- 1:06:41Exceptions vs result types
- 1:19:42Exceptions as code compression
related talks
01h 04mKEYNOTE: De-fragmenting C++: Making exceptions more affordable and usable
01h 33mDe-fragmenting C++: Making Exceptions and RTTI More Affordable and Usable
51mC++ Exceptions and Stack Unwinding
01h 11mC++ in the World of Embedded Systems
54mCost of Abstractions in Embedded Systems
01h 02mExceptional C++
44mError handling in C++: as easy as "use exceptions"?
45mFil-C: memory safety with fanatical C/C++ compatibility
