4 ms·
It is really hard to write a generic precise GC (knows and follows object structure) that you can open source because every project that would want to use it ha
by zenspider 18y ago
It is really hard to write a generic precise GC (knows and follows object structure) that you can open source because every project that would want to use it has a different object structure. So pretty much every one has to be written from scratch. It is cheap and easy to throw in a conservative GC. It just isn't as good.
Squeak and the other smalltalks pretty much all have precise GCs. I'm not as familiar with the GC systems in the lisps, but I'd guess that they're all precise because the memory structures are so damn simple/clean. It is the scripting languages that start to fall down. Perl used reference counting for years, prolly still does; same with python. Ruby has a mark/sweep conservative. But hey, they work well enough. shrug
- jey 18y agoHmm, I don't think it would be that hard to design a flexible yet efficient interface for specifying object and vtable layouts. Yes, it would create some restrictions on the clients of the GC, but I don't think they'd have to be particularly severe.