Breadth-first Cycle Collection Reference Counting: Theory and a Rust Smart Pointer Implementation

We present a new garbage collection reference counting algorithm capable of collecting reference cycles—overcoming a known limitation of traditional reference counting. The algorithm's key features include resilience to errors during tracing, support for object finalisation, no need for supplementary heap memory during collection, and a fast breadth-first tracing approach that avoids stack overflows. We implement the algorithm as a Rust library that is idiomatic and highly compatible with the Rust ecosystem and that leverages Rust's type system and borrow checker to minimise unsafe code and prevent undefined behaviour. We report benchmarks that show that our proposal performs comparably to popular Rust alternatives and outperforms them when dealing with garbage cycles.

Authors

Institutions

Publication Details

Published
2025-03-31
DOI
https://doi.org/10.1145/3672608.3707785
Citations
1
Primary Topic
Data Quality and Management
Type
article
Field-Weighted Citation Impact
2.11

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Breadth-first Cycle Collection Reference Counting: Theory and a Rust Smart Pointer Implementation

Saverio Giallorenzo, Francesco Goretti
1 citations
Data Quality and Management
2.11
article

Breadth-first Cycle Collection Reference Counting: Theory and a Rust Smart Pointer Implementation

Saverio Giallorenzo, Francesco Goretti
article en
1 citations

Abstract

We present a new garbage collection reference counting algorithm capable of collecting reference cycles—overcoming a known limitation of traditional reference counting. The algorithm's key features include resilience to errors during tracing, support for object finalisation, no need for supplementary heap memory during collection, and a fast breadth-first tracing approach that avoids stack overflows. We implement the algorithm as a Rust library that is idiomatic and highly compatible with the Rust ecosystem and that leverages Rust's type system and borrow checker to minimise unsafe code and prevent undefined behaviour. We report benchmarks that show that our proposal performs comparably to popular Rust alternatives and outperforms them when dealing with garbage cycles.

Institut national de recherche en sciences et technologies du numérique (FR), University of Bologna (IT)
Ministero dell'Università e della Ricerca
Openalex Percentile: Top 17%
Data Quality and Management
2.11
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.