Memory Management

Diagrams

Background

Why not just use malloc/free and new/delete? A custom memory allocator allows you to: Some aspects to address in a custom memory manager: (these are usually trade-offs)


Ease of Use

Performance

Memory Overhead

Fragmentation Control

Debugging Capabilities

Self-check:
1. What's the difference between a pointer and a handle?
2. What is the benefit of locality of reference?
3. What is the benefit of having fixed-size blocks?
4. What is the drawback of having fixed-size blocks?


Automatic Memory Management