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.

Giallorenzo, S., Goretti, F. (2025). Breadth-first Cycle Collection Reference Counting: Theory and a Rust Smart Pointer Implementation. 1601 Broadway, 10th Floor, NEW YORK, NY, UNITED STATES : Association for Computing Machinery [10.1145/3672608.3707785].

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

Giallorenzo, Saverio;Goretti, Francesco
2025

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.
2025
Proceedings of the ACM Symposium on Applied Computing
1412
1420
Giallorenzo, S., Goretti, F. (2025). Breadth-first Cycle Collection Reference Counting: Theory and a Rust Smart Pointer Implementation. 1601 Broadway, 10th Floor, NEW YORK, NY, UNITED STATES : Association for Computing Machinery [10.1145/3672608.3707785].
Giallorenzo, Saverio; Goretti, Francesco
File in questo prodotto:
Eventuali allegati, non sono esposti

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11585/1030168
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 1
  • ???jsp.display-item.citation.isi??? 1
social impact