Skip to content
所有標籤

#free-list

2 篇文章

Stanford CS107 Lecture 23:把 realloc 留在原地,必須守住哪些 allocator 不變量

CS107 第 23 講把 explicit free list 推進到原地 realloc:縮小時切出可用區塊,放大時吞併右側 free blocks,做不到才配置、複製、釋放;每一步都要同時維持實體 heap 與邏輯 free list。

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

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