TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Garbage collected smart pointers in Rust via concurrent cycle collection

120 pointsby maplant5 months ago

5 comments

thesave5 months ago
Since it seems on topic, I link a related project by an undergraduate at the University of Bologna <a href="https:&#x2F;&#x2F;saveriogiallorenzo.com&#x2F;publications&#x2F;sac2025a&#x2F;sac2025a.pdf" rel="nofollow">https:&#x2F;&#x2F;saveriogiallorenzo.com&#x2F;publications&#x2F;sac2025a&#x2F;sac2025...</a><p>Essentially, it’s a refinement of Bacon-Rajan’s cycle collector (sequential) that does not require auxiliary heap memory and handles failures when tracing complex object graphs because it uses a breadth-first technique that fundamentally prevents stack overflow scenarios.<p>What&#x27;s particularly compelling is the Rust implementation, which weaves the type system and borrow checker into the algorithm&#x27;s design. When dealing with garbage cycles, the algorithm doesn&#x27;t just match current Rust GC alternatives, it outperforms them.
评论 #42417521 未加载
lilyball5 months ago
Nitpick: In section 3.3, for the Vec impl, instead of finalizing a child and then forgetting it, the child should be moved into a ManuallyDrop first. That way if the finalization panics it doesn&#x27;t try to drop the child again while unwinding.
评论 #42413093 未加载
zozbot2345 months ago
Why does this need to rely on `static` variables in the implementation? Can we use QCell-like lifetime branding tricks to have multiple independent GC-reference graphs that are assured at compile time to always be disjoint, and might undergo collection by separate threads?
评论 #42411482 未加载
评论 #42411369 未加载
muizelaar5 months ago
An older non concurrent cycle collector is here: <a href="https:&#x2F;&#x2F;github.com&#x2F;fitzgen&#x2F;bacon-rajan-cc">https:&#x2F;&#x2F;github.com&#x2F;fitzgen&#x2F;bacon-rajan-cc</a>
评论 #42411207 未加载
iwontberude5 months ago
I thought one of major points of pride for Rust was eschewing garbage collectors. Why don’t I understand?
评论 #42411104 未加载
评论 #42411119 未加载
评论 #42411257 未加载
评论 #42411059 未加载
评论 #42411216 未加载
评论 #42411121 未加载
评论 #42411127 未加载
评论 #42411342 未加载
评论 #42411135 未加载