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.

The D Garbage Collector

139 pointsby sconxuabout 8 years ago

5 comments

rurbanabout 8 years ago
This is not really an article about &quot;How the D garbage collector works&quot;, rather an article &quot;How to avoid garbage in D&quot;. More tips and tricks are at: <a href="https:&#x2F;&#x2F;bitbucket.org&#x2F;infognition&#x2F;dstuff" rel="nofollow">https:&#x2F;&#x2F;bitbucket.org&#x2F;infognition&#x2F;dstuff</a><p>Here is the better explanation of the GC: <a href="https:&#x2F;&#x2F;dlang.org&#x2F;spec&#x2F;garbage.html" rel="nofollow">https:&#x2F;&#x2F;dlang.org&#x2F;spec&#x2F;garbage.html</a>, which is basically a very slow and conservative stop the world Mark &amp; Sweep, which runs at every allocation. Basically a simple version of BoehmGC.<p>Due to the unfortunate C ABI, a fast copying collector is not really doable. One cannot track all the internal and external pointers. Well, one could, but has to pessimize the locals on every external pointer reference.
评论 #13916131 未加载
评论 #13916170 未加载
评论 #13917112 未加载
评论 #13916122 未加载
评论 #13920552 未加载
评论 #13916569 未加载
zyngaroabout 8 years ago
Too bad Dlang never reached mainstream. It&#x27;s a perfectly​ suitable language for backend programming and system programming where golang is growing popular.
评论 #13918599 未加载
评论 #13918785 未加载
tombertabout 8 years ago
Has anyone here done any production-level stuff with D? I&#x27;m debating using it for my next project, but I want to see if it&#x27;s industry-tested.
评论 #13920232 未加载
评论 #13916787 未加载
评论 #13916772 未加载
评论 #13915885 未加载
评论 #13915342 未加载
评论 #13918563 未加载
评论 #13919101 未加载
评论 #13916882 未加载
dominotwabout 8 years ago
what are the advantages of running GC only when allocations are happening, instead of running concurrently?<p>Is the idea that you can explicitly control the behavior of GC by tuning your allocations? Is it burdensome for the programmer to constantly think about this while writing code?
评论 #13916077 未加载
nialv7about 8 years ago
If you are interested in current D memory management situation, you might want to look at this as well: <a href="https:&#x2F;&#x2F;dlang.org&#x2F;phobos&#x2F;std_experimental_allocator.html" rel="nofollow">https:&#x2F;&#x2F;dlang.org&#x2F;phobos&#x2F;std_experimental_allocator.html</a>