Lune

PLDI2022Top-tier venue

Turning manual concurrent memory reclamation into automatic reference counting

Daniel Anderson, Guy E. Blelloch, Yuanhao Wei

Abstract

Safe memory reclamation (SMR) schemes are an essential tool for lock-free data structures and concurrent programming. However, manual SMR schemes are notoriously difficult to apply correctly, and automatic schemes, such as reference counting, have been argued for over a decade to be too slow for practical purposes. A recent wave of work has disproved this long-held notion and shown that reference counting can be as scalable as hazard pointers, one of the most common manual techniques. Despite these tremendous improvements, there remains a gap of up to 2x or more in performance between these schemes and faster manual techniques such as epoch-based reclamation (EBR).

In this work, we first advance these ideas and show that in many cases, automatic reference counting can in fact be as fast as the fastest manual SMR techniques. We generalize our previous Concurrent Deferred Reference Counting (CDRC) algorithm to obtain a method for converting any standard manual SMR technique into an automatic reference counting technique with a similar performance profile. Our second contribution is extending this framework to support weak pointers, which are reference-counted pointers that automatically break pointer cycles by not contributing to the reference count, thus addressing a common weakness in reference-counted garbage collection.

Our experiments with a C++-library implementation show that our automatic techniques perform in line with their manual counterparts, and that our weak pointer implementation outperforms the best known atomic weak pointer library by up to an order of magnitude on high thread counts. All together, we show that the ease of use of automatic memory management can be achieved without significant cost to practical performance or general applicability.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures cites A Family of Fast and Memory Efficient Lock- and Wait-Free Reclamation
  • Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures cites Concurrent deferred reference counting with constant-time overhead
  • Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures cites Universal wait-free memory reclamation
  • Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures cites OrcGC: automatic lock-free memory reclamation
  • Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures cites Are Your Epochs Too Epic? Batch Free Can Be Harmful
  • A Family of Fast and Memory Efficient Lock- and Wait-Free Reclamation cites Concurrent deferred reference counting with constant-time overhead
  • A Family of Fast and Memory Efficient Lock- and Wait-Free Reclamation cites Universal wait-free memory reclamation
  • A Family of Fast and Memory Efficient Lock- and Wait-Free Reclamation cites OrcGC: automatic lock-free memory reclamation
  • A Family of Fast and Memory Efficient Lock- and Wait-Free Reclamation cites Snapshot-free, transparent, and robust memory reclamation for lock-free data structures
  • Concurrent Immediate Reference Counting cites Concurrent deferred reference counting with constant-time overhead
  • Concurrent Immediate Reference Counting cites OrcGC: automatic lock-free memory reclamation
  • Concurrent Immediate Reference Counting cites Snapshot-free, transparent, and robust memory reclamation for lock-free data structures
  • Concurrent deferred reference counting with constant-time overhead cites NVTraverse: in NVRAM data structures, the destination is more important than the journey
  • Concurrent deferred reference counting with constant-time overhead cites Universal wait-free memory reclamation
  • Concurrent deferred reference counting with constant-time overhead cites OrcGC: automatic lock-free memory reclamation
  • OrcGC: automatic lock-free memory reclamation cites Universal wait-free memory reclamation
  • Are Your Epochs Too Epic? Batch Free Can Be Harmful cites Concurrent deferred reference counting with constant-time overhead
  • Are Your Epochs Too Epic? Batch Free Can Be Harmful cites Universal wait-free memory reclamation
  • Are Your Epochs Too Epic? Batch Free Can Be Harmful cites OrcGC: automatic lock-free memory reclamation
  • Snapshot-free, transparent, and robust memory reclamation for lock-free data structures cites Universal wait-free memory reclamation
  • Snapshot-free, transparent, and robust memory reclamation for lock-free data structures cites OrcGC: automatic lock-free memory reclamation
  • Leveraging Immutability to Validate Hazard Pointers for Optimistic Traversals cites A Family of Fast and Memory Efficient Lock- and Wait-Free Reclamation
  • Leveraging Immutability to Validate Hazard Pointers for Optimistic Traversals cites Concurrent Immediate Reference Counting
  • Leveraging Immutability to Validate Hazard Pointers for Optimistic Traversals cites Concurrent deferred reference counting with constant-time overhead
  • Leveraging Immutability to Validate Hazard Pointers for Optimistic Traversals cites Universal wait-free memory reclamation
  • Leveraging Immutability to Validate Hazard Pointers for Optimistic Traversals cites Snapshot-free, transparent, and robust memory reclamation for lock-free data structures
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. A Family of Fast and Memory Efficient Lock- and Wait-Free ReclamationRuslan Nikolaev, Binoy RavindranPLDI 2024 · 7 citations
  2. Concurrent Immediate Reference CountingJaehwang Jung, Jeonghyeon Kim, Matthew J. Parkinson, Jeehoon KangPLDI 2024 · 6 citations
  3. Are Your Epochs Too Epic? Batch Free Can Be HarmfulDaewoo Kim, Trevor Brown, Ajay SinghPPoPP 2024 · 5 citations
  4. Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data StructuresAjay Singh, Trevor BrownPPoPP 2025 · 3 citations
  5. Leveraging Immutability to Validate Hazard Pointers for Optimistic TraversalsJanggun Lee, Jeonghyeon Kim, Jeehoon KangPLDI 2025 · 2 citations

Builds on5

  1. NVTraverse: in NVRAM data structures, the destination is more important than the journeyMichal Friedman, Naama Ben-David, Yuanhao Wei, Guy E. Blelloch et al.PLDI 2020 · 52 citations
  2. Concurrent deferred reference counting with constant-time overheadDaniel Anderson, Guy E. Blelloch, Yuanhao WeiPLDI 2021 · 26 citations
  3. Universal wait-free memory reclamationRuslan Nikolaev, Binoy RavindranPPoPP 2020 · 23 citations
  4. OrcGC: automatic lock-free memory reclamationAndreia Correia, Pedro Ramalhete, Pascal FelberPPoPP 2021 · 19 citations
  5. Snapshot-free, transparent, and robust memory reclamation for lock-free data structuresRuslan Nikolaev, Binoy RavindranPLDI 2021 · 18 citations

Related papers

  1. NBR: neutralization based reclamationAjay Singh, Trevor Brown, Ali José MashtizadehPPoPP 2021 · 23 citations
  2. RRR-SMR: Reduce, Reuse, Recycle: Better Methods for Practical Lock-Free Data StructuresMd Amit Hasan Arovi, Ruslan NikolaevPLDI 2025 · 2 citations
  3. Fixing Non-blocking Data Structures for Better Compatibility with Memory Reclamation SchemesMd Amit Hasan Arovi, Ruslan NikolaevPPoPP 2026 · 1 citation
  4. A marriage of pointer- and epoch-based reclamationJeehoon Kang, Jaehwang JungPLDI 2020 · 25 citations
  5. Pointer life cycle types for lock-free data structures with memory reclamationRoland Meyer, Sebastian WolffPOPL 2020 · 7 citations
Dusk over the sea between two cliffs drawn in fine vertical lines