HN Hall of Fame Weekly email

Memory management in C programs (2014)

nethack4.org Books & learning Tutorials & guides Software engineering Candidate
Screenshot of nethack4.org captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 3 calendar years, with breakout response in 2 of them.

submissions
3
submitters
3
observed span
2014–2021
peak thread · 103 comments
216 pts
latest 20+ return · 2016-07-18
216 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

I'm going to claim that the problem being solved here fundamentally comes from attempting to shoehorn early exit into an ancient codebase that wasn't designed for it, via longjmp. Exceptions can be a handy language feature, but plenty of modern code written in languages like C++ (whose exception support is often eschewed) and Go gets by without them. It just has to be written so that most functions manually propagate error codes they receive, potentially after manually unwinding some core…

comex·216-point thread·

Jesus Christ. Let the reader beware indeed. There are horrible suggestions here that will result in bad code if you think "Hey, that's a cool suggestion, I'll try that!". Or "Hey, I read in that blogpost this is OK in C, I'll do this". For instance: Stack allocation. It's seldom OK to use static variables even with accessor functions. Wrap the state that the functions operate in structs that you pass to functions. There are a few places where you…

fsloth·162-point thread·

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
2

100+ points or 50+ comments

Total points
381

reference only — not used in Hall rules or ranking

Total comments
176

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2014-03-17Memory management in C programsFirst breakoutnagriar16273
2016-07-18Memory management in C programs (2014)Best thread · Latest 20+ point returnadamnemecek216103
2021-05-31Memory Management in C programs (2014)generichuman30