The heap so far
Running a program 运行程序的过程
What is a heap allocator?
Heap allocator requirements and goals
Maximize throughput 最大吞吐量 和 Maximize memory utilization 最大内存利用率
Method 0: Bump Allocator
Method 1: Implicit Free List Allocator 隐式空闲链表分配器

Final Project: Implicit Allocator
Coalescing 堆碎片内存聚合
In-Place Realloc 就地重分配

如上图的就不是就地重分配。
Method 2: Explicit Free List Allocator 显式空闲链表分配器
Explicit Allocator
Explicit Free List: List Design
Coalescing
In-place realloc
padding
padding是指为了使分配的内存对齐8,对一些数据类型需要多分配一些内存来凑齐8的倍数,多分配的这部分内存叫做padding(填充)。

Going beyond: Explicit list w/size buckets
Final Project: Explicit Allocator
Live Session Slides
In the wild: glibc allocator

https://sourceware.org/glibc/wiki/MallocInternals
Practices
几个加深理解的小练习,可以从pdf的127页看起。
































