Skip to content
所有標籤

#malloc

2 篇文章

Stanford CS107 Lecture 21:Heap Allocator 的第一個設計,速度與空間為何互相拉扯

CS107 第 21 講從 allocator 的 alignment、throughput 與 utilization 目標出發,以 bump allocator 和 implicit free list 拆解 metadata、splitting、placement、內部與外部碎片,以及 free 後為何必須 coalesce。

Stanford CS107 Lecture 22:Explicit Free List 為何同時活在兩種順序裡

CS107 第 22 講把 implicit free list 改成 explicit free list:搜尋只拜訪可重用 blocks,但每塊 free memory 同時具有實體相鄰順序與邏輯鏈結順序,unlink、coalesce、reinsert 必須共同維持不變量。