2 ms·
This is a really really cool idea. Thank you for writing this up. Yes, that sounds like it would work fine to me. The only downside to keep in mind is that you
by munificent 2y ago
This is a really really cool idea. Thank you for writing this up.
Yes, that sounds like it would work fine to me. The only downside to keep in mind is that you will periods of time where you need to allocate more memory and have to do that first and then only free up memory in a GC after that allocation takes place. If you're very memory constrained or you need to allocate a lot, that could potentially be a problem.
But if I'm totally honest, I'm not sure how big of a problem that is in practice. One of the really annoying things about garbage collectors is how little literature there is on real-world collection strategies. You can find plenty of papers on collection algorithms, but it's hard to find material on when a GC should run.
- kerkeslager 2y agoYeah, "When to schedule?" is a really good question. Have you ever contacted the authors of The Garbage Collection Handbook[1]? It seems like they intend that book to have the most breadth of knowledge about GC, and if there's anybody out there who has studied when to collect they might know who. [1] https://gchandbook.org/index.html https://gchandbook.org/index.html
- munificent 2y agoI haven't. That's a good idea. I'm pretty good at tracking down resources, but really bad at actually contacting humans.
- kerkeslager 2y agoAs a hobbyist freelancer with no access to resources like JSTOR, contacting the authors is often the only way I can obtain access to academic papers. It works great! Incidentally, that book might contain information on when to GC; I haven't actually finished it yet.