3 ms·
In production such a toy GC, without threading support and without register scanning? Imprecise also. How do you seperate large ints from pointers? Brave.
by rurban 4y ago
In production such a toy GC, without threading support and without register scanning? Imprecise also. How do you seperate large ints from pointers?
Brave.
- webkike 4y agoIt’s a learning exercise man. Congratulations, you are very smart. FWIW, all of your questions are addressed in the article
- matheusmoreira 4y ago> In production Did you know Ruby has a garbage collector not unlike this one? People are running it in production right now. > a toy GC It does its job. These algorithms have been working for decades now. > without threading support It can just stop the whole world. > without register scanning Add some inline assembly to spill all the registers. I did this on my own language implementation not even a month ago. If this was a real project I'd submit a patch. The author even acknowledged this limitation and hinted at how to solve it, he just didn't want to get into those gritty details in his article. I'm happy to demonstrate if you want. > Imprecise also. How do you seperate large ints from pointers? You don't. You collect conservatively. It will have false positives but not false negatives. In other words, it will mistake some ints for pointers but it won't collect memory that's in use. Correct if suboptimal behavior.