Re:Removing garbage collection from the Rust language
by ben0x539 on Monday June 03, 2013 @09:53AM
(#5813251)
That's only really true for the current GC design. I don't know if there is anything stopping someone from sharing memory via unsafe pointers and trying to manage that with a custom GC.
Re:Removing garbage collection from the Rust language
by kibwen on Monday June 03, 2013 @10:33AM
(#5813481)
True, I don't know if anything's going to stop you, but in my uninformed opinion you'd probably be violating so many built-in assumptions that you'd have to perform invasive surgery on the runtime to get it to work. But I'm hardly an expert in this area.
I can't answer the rest of your question, but note that Rust doesn't allow shared memory between tasks. Therefore, in the worst case, any garbage collector would only need to "stop the task" to mark, while the remainder of the tasks proceed uninhibited.