News for hackers. Stuff that matters.
Re:Let's make the Emacs GC safe and iterative by kazinator on Saturday March 03, 2018 @11:00AM (#16509812)
> Why don't they just use the Deutsch-Schorr-Waite algorithm

Here is a good reason: you're debugging some problem that occurs in the middle of garbage collection. You have the world stopped and would like to look at some objects. Oops, pointers are scrambled by this algorithm and won't be put back in place until it runs to completion. (Which it might not even be able to do due to whatever bug you're trying to investigate, even if you have a way to initiate that.)

With regular recursive traversal, you can just bail garbage collection at any time: loop through all the heaps, and reset the gc bits of all objects to the "unmarked" state. Then examine whatever you want.

(If the bits aren't in the type tag, you don't even have to do that; though it's a good idea for them to be in a type tag because then an object which has been mis-handled by memory management (e.g. marked object remains in the live object graph after gc) then it has the wrong type and blows up when used.)

Re:Let's make the Emacs GC safe and iterative by cwzwarich on Saturday March 03, 2018 @01:29PM (#16510705)
In practice, if you get something like this wrong and are forced to debug it, you will probably have to do some code inspection or printf debugging to find the cause. But it's still better than most concurrent GC algorithms in that regard.
Re:Let's make the Emacs GC safe and iterative by kazinator on Sunday March 04, 2018 @01:10PM (#16515685)
What can't you debug with code inspection and printf?

Some black box with that has no printf (or not that you can insert into a custom build), and for which code isn't available.