Heap garbage collection with reference counting

Wuu Yang*, Huei Ru Tseng, Rong Hong Jan

*此作品的通信作者

研究成果: Conference contribution同行評審

摘要

In algorithms based on reference counting, a garbage-collection decision has to be made whenever a pointer x → y is about to be destroyed. At this time, the node y may become dead even if y's reference count is not zero. This is because y may belong to a piece of cyclic garbage. Some aggressive collection algorithms will put y on the list of potential garbage regardless of y's reference count. Later a trace procedure starting from y will be initiated. Other algorithms, less aggressive, will put y on the list of potential garbage only if y's reference count falls below a threshold, such as 3. The former approach may waste time on tracing live nodes and the latter may leave cyclic garbage uncollected indefinitely. The problem with the above two approaches (and with reference counting in general) is that it is difficult to decide if y is dead when the pointer x → y is destroyed. We propose a new garbage-collection algorithm in which each node maintains two, rather than one, reference counters, gcount and hcount. Gcount is the number of references from the global variables and from the run-time stack. Hcount is the number of references from the heap. Our algorithm will put node y on the list of potential garbage if and only if y's gcount becomes 0. The better prediction made by our algorithm results in more efficient garbage collectors.

原文English
主出版物標題ICSOFT 2010 - Proceedings of the 5th International Conference on Software and Data Technologies
頁面267-270
頁數4
DOIs
出版狀態Published - 2010
事件5th International Conference on Software and Data Technologies, ICSOFT 2010 - Athens, 希臘
持續時間: 22 7月 201024 7月 2010

出版系列

名字ICSOFT 2010 - Proceedings of the 5th International Conference on Software and Data Technologies
2

Conference

Conference5th International Conference on Software and Data Technologies, ICSOFT 2010
國家/地區希臘
城市Athens
期間22/07/1024/07/10

指紋

深入研究「Heap garbage collection with reference counting」主題。共同形成了獨特的指紋。

引用此