CppCon 2019 has ended
Back To Schedule
Monday, September 16 • 14:00 - 15:00
What Every Programmer Should Know About Memory Allocation

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

Memory allocators are a critical part of the run-time system for languages such as C++. Over the last few decades, the requirements for general-purpose memory allocation have become significantly more complex with different allocators evolving to handle different workloads varying by process age, concurrency, allocation patterns, object sizes, access patterns and more. Unfortunately, many application developers are unaware of their internals and their respective limitations and this directly impacts their ability to debug both performance and correctness problems related to dynamic memory allocation.

This talk will introduce the current industry standard memory allocators (general-purpose and specialized), the categories of memory allocators and their intended workloads and shed some light into their design and implementation. With this foundation, we will review real world problems and their respective solutions, where application performance was significantly hindered or complex bugs were introduced. The audience will walk away with knowledge of (sometimes surprising) anti-patterns to avoid when making use of dynamic memory allocation, and new technologies and techniques to use for improving performance and reliability. We will investigate cases where the general purpose allocator interface fails, and when alternatives are better. Finally, we will reinforce our new-found understanding of some basic memory allocator internals to improve our ability to investigate and root cause heap corruption bugs that would otherwise take hours (sometimes even weeks) to fix.

Finally, we will look to the horizon and introduce some exciting new work being done in the area including memory allocator interfaces for improved spatial locality for related objects from both academia and industry.

avatar for Samy Al Bahra

Samy Al Bahra

CTO, Backtrace
Samy Al Bahra is the cofounder of Backtrace, where he is helping build a modern debugging platform for today’s complex applications. Prior to Backtrace, Samy was a principal engineer at AppNexus, where he played a lead role in the architecture and development of many mission-critical... Read More →

Hannes Sowa


Paul Khuong

Vice President, Not Google
After toiling on his dissertation about mathematical optimisation methods for large-scale network design, Paul Khuong has spent the majority of his professional and hobbyist life reverse engineering and modernising C, C++, and Common Lisp legacy systems. When not engaged in code archaeology... Read More →

Monday September 16, 2019 14:00 - 15:00
Aurora A

Attendees (501)