Stanford CS107 Lecture 21:Heap Allocator 的第一個設計,速度與空間為何互相拉扯
CS107 第 21 講從 allocator 的 alignment、throughput 與 utilization 目標出發,以 bump allocator 和 implicit free list 拆解 metadata、splitting、placement、內部與外部碎片,以及 free 後為何必須 coalesce。
CS107 第 21 講從 allocator 的 alignment、throughput 與 utilization 目標出發,以 bump allocator 和 implicit free list 拆解 metadata、splitting、placement、內部與外部碎片,以及 free 後為何必須 coalesce。
CS107 第 10 講從 sizeof 與 pointer arithmetic 走進 stack frame lifetime:回傳 local array 會留下 dangling pointer;malloc 讓資料跨越函式返回,但也把 NULL、容量計算、ownership、free 與 memory leak 交給程式設計者。