Taming Dynamic Memory - An Introduction to Custom Allocators in C++
Offered By: code::dive conference via YouTube
Course Description
Overview
Explore dynamic memory allocation in C++ and learn about custom allocators in this conference talk from code::dive 2018. Delve into basic allocation techniques like pooling and monotonic allocation, examining their performance and reliability. Understand technical challenges such as alignment and stateful allocator management in the standard library. Discover popular allocator implementations and how to integrate them with modern C++ codebases. Cover topics including coalescing, shared global state, memory leaks, runtime properties, and real-world examples. Examine STD vector, node-based containers, and hashmaps, discussing their extremes and rehash operations. Learn about padding, alignment, and natural alignment in memory allocation. Investigate the default allocator, single allocator, memory reclamation, and auxiliary data structures. Explore the pool allocator, its chunks, overwrite capabilities, and runtime costs. Understand multipool allocators, custom allocators in C, PMR memory resources, and global locators to enhance your C++ programming skills.
Syllabus
Introduction
The Simpsons
Agenda
What is dynamic memory
Coalescing
Shared Global State
Simpler locator
Memory leak
Runtime properties
Real world examples
STD vector
Nodebased containers
Hashmap
Hashmap extremes
Rehash operation
Why is it hard to guarantee
What happens on the DLL
Padding
Alignment
Natural alignment
Default allocator
Single allocator
Memory reclamation
Auxiliary data structure
Where to store auxiliary notes
Reasons to store auxiliary notes
The bottom line
The pool locator
Chunks
Overwrite
Put something back
Diffusion
Runtime cost
Memory consumption
Multipool
Custom allocators in C
Historical quirk
PMR memory resources
Chaining
Fixed vs Dynamic
Parameters
Global Locator
Wrapup
Taught by
code::dive conference
Related Courses
Heterogeneous Parallel ProgrammingUniversity of Illinois at Urbana-Champaign via Coursera Advanced Operating Systems
Georgia Institute of Technology via Udacity 計算機程式設計 (Computer Programming)
National Taiwan University via Coursera Introduction to Operating Systems
Georgia Institute of Technology via Udacity Android Performance
Google via Udacity