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.
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.