https://github.com/no-defun-allowed/the_cooler_shared_ptr
Coalesced reference counting smart pointer
https://github.com/no-defun-allowed/the_cooler_shared_ptr
garbage-collector reference-counting smart-pointer
Last synced: 2 months ago
JSON representation
Coalesced reference counting smart pointer
- Host: GitHub
- URL: https://github.com/no-defun-allowed/the_cooler_shared_ptr
- Owner: no-defun-allowed
- Created: 2022-11-05T07:53:12.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-05T08:25:37.000Z (over 2 years ago)
- Last Synced: 2025-01-31T05:47:20.532Z (4 months ago)
- Topics: garbage-collector, reference-counting, smart-pointer
- Language: C++
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# The Cooler `shared_ptr`
`crc::cooler_shared_ptr` provides a [coalescing](https://sites.cs.ucsb.edu/~ckrintz/racelab/gc/papers/levanoni-on-the-fly-rc.pdf)
reference-counting smart pointer, which trades off immediate destruction for
fewer refcount updates. You may also call `crc::collect()` to cause collection to
run immediately.This isn't thread-safe at all. I'm not entirely convinced it works with
one thread, even. But RAII does suffice to provide a shadow stack of sorts.