TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Introduction to Memory Management (2018)

134 点作者 lrsjng大约 6 年前

6 条评论

mattnewport大约 6 年前
From what I've skimmed so far this isn't a very good or accurate resource. In particular it doesn't mention RAII in its discussion of C++, doesn't mention Rust at all, neglects the role of stack allocation, glosses over the common use of object pooling in GC languages as a workaround for performance issues, has little on the extra issues introduced by multithreaded code and understates the performance issues of GC.
评论 #19356161 未加载
评论 #19355963 未加载
pcwalton大约 6 年前
I don&#x27;t think this is from 2018; the contents are mostly unchanged since 2014 [1].<p>Even though it&#x27;s a bit dated, memorymanagement.org is one of my favorite resources. It&#x27;s opinionated, in a good way. The techniques that were developed in the 2000s, which this site thoroughly covers, are still the state of the art for garbage collection in my opinion.<p>[1]: <a href="http:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20140616011030&#x2F;https:&#x2F;&#x2F;www.memorymanagement.org&#x2F;mmref&#x2F;index.html" rel="nofollow">http:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20140616011030&#x2F;https:&#x2F;&#x2F;www.memory...</a>
keldaris大约 6 年前
Even though many of the technical points are highly debatable, my biggest issue is with the sentence &quot;the programmer is freed to work on the actual problem&quot; listed among the &quot;advantages&quot; of automatic memory management, and with how ubiquitous that mindset has become.<p>Insofar as computer programming is concerned, the &quot;actual problem&quot; is always the transformation of specific data on a specific set of computing hardware. Automating memory management doesn&#x27;t imply working on the actual problem, it&#x27;s just outsourcing a part of the actual problem in the pursuit of other objectives - decreasing development time, reducing the likelihood of specific bugs, etc. I&#x27;m not arguing that people shouldn&#x27;t use automatic memory management, it often makes perfectly good technical and business sense to do so - but pretending that memory management is not a crucial part of solving any real problem in computer programming (even if you&#x27;re not doing it explicitly) does no good to anyone.
评论 #19357131 未加载
pizlonator大约 6 年前
I get that it’s well intentioned but I wish folks stopped talking about the buddy allocator. It’s so obsolete. It’s not the fastest and it sure has some of the worst fragmentation due to very imprecise sizing.
评论 #19355559 未加载
评论 #19356164 未加载
评论 #19356091 未加载
anitil大约 6 年前
When reading the language section [0] I was surprised to see that COBOL had no heap allocation until 2002. Searching around, the only comments I could find amounted to &quot;We just didn&#x27;t need it.&quot;. Can anyone fill me in?<p>[0]: <a href="https:&#x2F;&#x2F;www.memorymanagement.org&#x2F;mmref&#x2F;lang.html" rel="nofollow">https:&#x2F;&#x2F;www.memorymanagement.org&#x2F;mmref&#x2F;lang.html</a>
评论 #19356901 未加载
评论 #19363413 未加载
dataking大约 6 年前
Expected to see Rust&#x27;s approach mentioned since it occupies an interesting point in the design space, i.e., automatic memory management where lifetimes are (mostly) determined at compile-time vs. at run-time (RC and&#x2F;or GC).