全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Garbage collection, mark and sweep, tri-colour invariant?

又称: garbage collection · mark and sweep · tri-colour invariant

Definition 9.5 University Computer Science — Year 3 · 第 9 章 — Memory Management and Garbage Collection

Garbage collection is the automatic freeing of garbage. A mark-and-sweep collector marks every object reachable from the roots, then sweeps the whole heap and frees every object left unmarked. During marking, an object is white if not yet reached, grey if reached but its references not yet examined, black if reached and all its references examined. The tri-colour invariant says that no black object refers to a white one.

在原文中阅读 →