Hacker News new | ask | show | jobs
by rayiner 5533 days ago
Of course you're leaving out the malloc()/free() implementation that the ref-counting scheme depends on that the GC doesn't.
1 comments

Perhaps I was thinking that that's usually provided by the operating system "for free". Hard to imagine an actual nontrivial GC system not needing basic malloc/free at some point anyway. Come to think of it, I think I actually tried implementing something like that once.

Alternatively, you could implement a simple first-fit free-block-list scheme in a small amount of code. It might not look terribly different from something a GC might do anyway.

Still, I think it's a fair point.