Summary
C++ allows a great degree of flexibility. Resource-constrained embedded systems and safety-critical guidelines can impose some limitations on the usage of certain C++ features, such as exception handling, RTTI, and the usage of dynamic memory allocation by containers and other modules from the standard C++ library. C++ acknowledges those concerns and provides mechanisms for disabling unwanted features. In this chapter, we learned about different strategies for mitigating concerns of dynamic memory allocation by means of local allocators and overloading global new
and delete
operators.
The learning curve is steep but worth the effort, so let’s continue our journey of discovering C++ in embedded systems.
In the next chapter, we will explore the C++ ecosystem for embedded development.