HN Hall of Fame Weekly email

Writing a Simple Garbage Collector in C (2020)

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

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

submissions
4
submitters
4
observed span
2019–2023
peak thread · 32 comments
190 pts
latest 20+ return · 2023-04-08
190 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

Wow! What a blast from the past. I originally submitted this article back in 2014 when it was hosted on my personal page hosted by my university. You can view the thread here: https://news.ycombinator.com/item?id=8222487 When I migrated to my own personal domain, I decided I would update the article to address the comments on that thread, and I think the end result was much better (but alas, I never had a reason to re-submit the article here). Obviously I do…

webkike·190-point thread·

Issues I found at a glance: 1. This uses unsigned int for the chunk size, so the allocator will overflow on requests of 4GB or more despite taking a size_t. It seems that this is 32-bit only. 2. Even on 32-bit, the num_units calculation will overflow if you request (for example) 0xffffffff bytes of memory instead of returning an error. 3. None of this is thread-safe. It needs a global mutex lock. 4. EBP cannot be relied upon to yield…

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
339

reference only — not used in Hall rules or ranking

Total comments
55

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2019-12-15Writing a Simple Garbage Collector in CFirst breakoutmbroncano14223
2021-01-23Writing a Simple Garbage Collector in Csigna1130
2021-10-15Writing a Simple Garbage Collector in Cphyrex40
2023-04-08Writing a Simple Garbage Collector in C (2020)Best thread · Latest 20+ point returnsusam19032