网站首页  英汉词典

请输入您要查询的英文单词:

 

单词 Mark and sweep
释义

Mark and sweep

英语百科

Tracing garbage collection

(重定向自Mark and sweep)
Naive mark-and-sweep in action on a heap containing eight objects.  Arrows represent object references. Circles represent the objects themselves.  Objects #1, #2, #3, #4, and #6 are strongly referenced from the root set. On the other hand, objects #5, #7, and #8 are not strongly referenced either directly or indirectly from the root set; therefore, they are garbage.

An example of tri-color marking on a heap with 8 objects. 
White, grey, and black objects are represented by light-grey, yellow, and blue, respectively.

In computer programming, tracing garbage collection is a form of automatic memory management that consists of determining which objects should be deallocated ("garbage collected") by tracing which objects are reachable by a chain of references from certain "root" objects, and considering the rest as "garbage" and collecting them. Tracing garbage collection is the most common type of garbage collection – so much so that "garbage collection" often refers to tracing garbage collection, rather than other methods such as reference counting – and there are a large number of algorithms used in implementation.

随便看

 

英汉网英语在线翻译词典收录了3779314条英语词汇在线翻译词条,基本涵盖了全部常用英语词汇的中英文双语翻译及用法,是英语学习的有利工具。

 

Copyright © 2004-2024 encnc.com All Rights Reserved
更新时间:2025/6/21 11:27:43