A lightweight cyclic reference counting algorithm

  • Authors:
  • Chin-Yang Lin;Ting-Wei Hou

  • Affiliations:
  • Department of Engineering Science, National Cheng Kung University, Tainan, Taiwan;Department of Engineering Science, National Cheng Kung University, Tainan, Taiwan

  • Venue:
  • GPC'06 Proceedings of the First international conference on Advances in Grid and Pervasive Computing
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper focuses on a major weakness of reference counting technique – the lack of collecting cyclic garbage. Most reference counted systems handle this problem by either invoking a global mark-sweep collector occasionally, or incorporating a local ("partial") tracing collector that considers only the cycle candidates (objects) but needs several traces on them. This paper proposes a "lightweight" cycle detector, which is based on the partial tracing approach but collects garbage cycles in a simpler and more efficient way. Key to the algorithm is the removal of multiple traces on the cycle candidates – It effectively reclaims garbage cycles in only one trace. We have evaluated the algorithm in the Jikes Research Virtual Machine, where a set of benchmark programs from SPECjvm98 were applied. The experiments demonstrate the efficiency and practicability of the lightweight cycle detector, compared to a modern cycle detector that requires multiple traces on objects.