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.
• Computing methodologies → Concurrent algorithms.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 3f4e98c6-ed56-4bc5-b016-c6806fe3f3c9Cited by top-tier papers6
- A Family of Fast and Memory Efficient Lock- and Wait-Free ReclamationRuslan Nikolaev, Binoy RavindranPLDI 2024 · 7 citations
- Concurrent Immediate Reference CountingJaehwang Jung, Jeonghyeon Kim, Matthew J. Parkinson, Jeehoon KangPLDI 2024 · 6 citations
- Are Your Epochs Too Epic? Batch Free Can Be HarmfulDaewoo Kim, Trevor Brown, Ajay SinghPPoPP 2024 · 5 citations
- Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data StructuresAjay Singh, Trevor BrownPPoPP 2025 · 3 citations
- Leveraging Immutability to Validate Hazard Pointers for Optimistic TraversalsJanggun Lee, Jeonghyeon Kim, Jeehoon KangPLDI 2025 · 2 citations
Builds on5
- 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
- Concurrent deferred reference counting with constant-time overheadDaniel Anderson, Guy E. Blelloch, Yuanhao WeiPLDI 2021 · 26 citations
- Universal wait-free memory reclamationRuslan Nikolaev, Binoy RavindranPPoPP 2020 · 23 citations
- OrcGC: automatic lock-free memory reclamationAndreia Correia, Pedro Ramalhete, Pascal FelberPPoPP 2021 · 19 citations
- Snapshot-free, transparent, and robust memory reclamation for lock-free data structuresRuslan Nikolaev, Binoy RavindranPLDI 2021 · 18 citations
Related papers
- RRR-SMR: Reduce, Reuse, Recycle: Better Methods for Practical Lock-Free Data StructuresMd Amit Hasan Arovi, Ruslan NikolaevPLDI 2025 · 2 citations
- NBR: neutralization based reclamationAjay Singh, Trevor Brown, Ali José MashtizadehPPoPP 2021 · 23 citations
- Fixing Non-blocking Data Structures for Better Compatibility with Memory Reclamation SchemesMd Amit Hasan Arovi, Ruslan NikolaevPPoPP 2026 · 1 citation
- A marriage of pointer- and epoch-based reclamationJeehoon Kang, Jaehwang JungPLDI 2020 · 25 citations
- Pointer life cycle types for lock-free data structures with memory reclamationRoland Meyer, Sebastian WolffPOPL 2020 · 7 citations
