Hacker News new | past | comments | ask | show | jobs | submit login
Ugc: a single-header garbage collector library (github.com/bullno1)
29 points by mabynogy on June 10, 2017 | hide | past | favorite | 1 comment



Pretty cool, but 2 pointers of overhead per object is a lot. The linked-list approach to garbage collection is also going to produce a lot of memory fragmentation compared to arena-based collectors. The docs also suggest calling `ugc_step` multiple times per allocation. So this isn't a high performance solution, but the code is clean and easy to read.

Related reading: http://www.pipeline.com/~hbaker1/NoMotionGC.html




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: