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.

Ask HN: Why Isn’t Garbage Collection Parallelizable?

2 pointsby jonathanairdover 4 years ago
Since it’s not possible for the reference count of an object in memory to go from 0 to 1 isn’t concurrency a non-issue? The worst that could happen is that you don’t free up some memory that you would otherwise have by running it synchronously but it would just get freed in the next GC. Am I crazy here?

1 comment

pjmlpover 4 years ago
Tracing garbage collection is parallelizable, that is how all modern implementations work.<p>If you mean reference counting GC implementations, there are also paralleziable implementations, with help of lock free data structures or hazard pointers.<p>You can start by having a look at &quot;The Garbage Collection Handbook&quot;.<p><a href="http:&#x2F;&#x2F;gchandbook.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;gchandbook.org&#x2F;</a>