Dynamic memory allocation challenges in safety critical systems

Xavier Bonaventura

⏱ 90 minute session
intermediate
advanced
16:00-17:30, Thursday, 3rd April 2025
A program is nothing else than a bunch of instructions modifying chunks of memory based on some inputs to produce some outputs. When these chunks of memory are defined at runtime, we call it dynamic memory allocation. In C++ there are multiple situations where dynamic memory allocation is performed. A user can allocate dynamic memory explicitly in different ways, but dynamic memory allocation can also happen implicitly. There are multiple features of C++ that require dynamic memory allocation, but this is not always necessarily clear to the user. This might become a problem in certain fields. In safety critical systems some guidelines forbid the use of dynamic memory allocation.

In this talk we will analyse certain features of the C++ library to see if they dynamically allocate or not. We will also learn what are the challenges with dynamic memory allocation in safety critical systems and what alternatives do we have. By the end of the talk you will have gained the knowledge to dynamically allocate memory in safety critical systems in a safer way.

🏷 allocators
🏷 memory
🏷 C++

Xavier Bonaventura

Xavier Bonaventura is a Software Engineer at BMW, where he works on the software stack for the next generation of autonomous driving.

He is also part of the MISRA C++ working group and member of the ISO C++ committee representing the BMW Group.

Xavier believes that success in large scale projects can only be achieved through high-quality standards, using modern technologies, and applying software engineering principles at all levels.

He has been working in various fields such as computer graphics, information theory, and data aggregation and with codebases of different sizes, with contributions from 5 to 2000 software developers.

Xavier loves learning and teaching and when he is not programming he likes cooking, hiking, biking, and jogging.