Allocator APIs and memory regions
Follow one malloc call through the program, its allocator and the kernel, then see how freed blocks are reused, merged and sometimes misused. Memory management foundations · Operating systems.
A tiny malloc call may be answered from an old block, may grow the heap, or may map new memory. Which layer decides, and what happens to the memory after free?
What you will learn
- Separate the roles of the program, the allocator and the kernel
- Trace a request that is served from the pool and one that grows the program break
- Explain headers, merging and the bugs caused by lifetimes that disagree
Lesson outline
- Three layers behind one call
- Serving a request and growing the pool
- Headers and merging
- When lifetimes disagree
16 minutes · 3 scenes · 0 predict checks · 11 quiz questions
The full lesson is available with Premium.