Memory Allocation: Either Love It or Hate It (or just think it’s okay)

Highlights

  • Class starts with a thorough overview of classic allocation strategies
  • Teaches what strategies are helpful and, equally importantly, what strategies are wasting programmer and CPU time
  • Defines a modular allocator design that is easy to adapt to a variety of allocation patterns
  • Gives practical advise on choosing a good allocator on various platforms

Attendee profile

C++ programmers with an interest in speed and size optimization stand to gain most from this class. Understanding of basic templates is necessary. A grasp of pointers and low-level object layout is helpful but will be thoroughly explained during the class. 

Outline

  • Introduction
  • Lies, damn lies...
    • Engineering and learning challenges
    • Capacity vs. generalization
    • Specific allocators: Windows 7, Linux, jemalloc
  • Custom allocators
    • Temporal patterns
    • Size distribution
    • Regions
    • Free lists
  • Policy-based implementation
    • General interface
    • Top allocator
    • Regions (in-situ vs. heap-segmented)
    • Free lists
    • Reaps
  • Summary