To start to see why this is necessary, imagine what would go wrong if we loaded a payload, the OS suspended our thread for an hour, and then we started using it without checking if it had been moved.
-
-
Show this thread
-
In good news, this is the whole cost. If you pay it, you get nonblocking concurrent GC scanning covering all thread stacks, all user heaps, the managed heap, and you don't need any help from the OS or metadata from the compiler or special programming conventions.
Show this thread
End of conversation
New conversation -
-
-
Is that a spin lock at the top?
-
This Tweet is unavailable.
- 2 more replies
New conversation -
-
-
This Tweet is unavailable.
-
th_payload_hazard is a thread_local that each thread writes to say "GC, don't free this" and the GC reads after scanning everything and before freeing. See https://en.wikipedia.org/wiki/Hazard_pointer … and also http://ticki.github.io/blog/fearless-concurrency-with-hazard-pointers/ ….
- 1 more reply
-
-
-
It blows my mind you're writing a C++ garbage collector for fun aren't you the CEO? Why are you doing this to yourself


-
To me this is awesome. One of the reasons I have so much respect for
@ID_AA_Carmack John would spend all day at his PC programming. This shows an extreme passion for his craft. I’m guessing Tim is the same. I’d love to be a CEO in a position to not worry about all the other stuff - 4 more replies
New conversation -
-
-
Digital wizardry is strong with this one.pic.twitter.com/njha1T9x7H
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
*the cost of doing it in a language not designed for GC
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.