Loading…
CppCon 2020 has ended
Tuesday, September 15 • 12:00 - 13:00
Embedded: Customizing Dynamic Memory Management in C++

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
Dynamic memory allocation is a natural solution for many common programming problems. In C++, new-expressions allocate dynamic memory through a function called operator new. Unfortunately, the compiler-provided implementation of operator new is often expensive to run, non-deterministic, and risks fragmenting memory over time. As a result, too many resource-constrained systems (e.g., embedded, real-time, or high-performance applications) avoid using new-expressions altogether. This is unfortunate because C++ new-expressions were designed to be highly customizable for such purposes.

This session shows how to implement customized dynamic memory managers for use in resource-constrained systems. It presents multiple forms of operator new and operator delete and explains the language mechanisms behind them. It shows how you can replace the compiler-provided operator new and operator delete with your own implementation, either globally or for individual classes. You’ll leave with a clearer understanding of how new and delete work and how you can tailor them to meet the demands of many resource-constrained applications.

Speakers
avatar for Ben Saks

Ben Saks

Chief Engineer, Saks & Associates
Ben Saks is the chief engineer of Saks & Associates, which offers training and consulting in C and C++ and their use in developing embedded systems. Ben has represented Saks & Associates on the ISO C++ Standards committee as well as two of the committee’s study groups: SG14 (low-latency... Read More →


Tuesday September 15, 2020 12:00 - 13:00 MDT
Embedded