3 ms·
> one distinguishing factor of GC (vs refcounting) is the need to "stop the world" during the mark phase I can't answer the rest of your question, but note tha
by kibwen 13y ago
> one distinguishing factor of GC (vs refcounting) is the need to "stop the world" during the mark phase
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.
- ben0x539 13y agoThat'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.
- kibwen 13y agoTrue, 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.