4 ms·
I remember Cliff Click said that some parallel/concurrent algorithms are infeasable without a GC, because the additional complexity of memory management. Howeve
by qznc 11y ago
I remember Cliff Click said that some parallel/concurrent algorithms are infeasable without a GC, because the additional complexity of memory management. However, I do not remember any specific examples.
To speculate: A big graph data structure in your big server (not distributed) and some parallel algorithm working on it. There is so much data that you need to purge the obsolete stuff once in a while. Smart pointers are not enough unless you introduce weak references, which is unsafe and error prone. A C++ programmer would probably implement some kind of application-specific garbage collector, but I doubt it would be better than the JVMs GC.
- deleted 11y ago[deleted]
- dbaupp 11y agoSome algorithms are tricky, but there's a lot one can do without a GC via epoch-based reclamation schemes: http://aturon.github.io/blog/2015/08/27/epoch/ http://aturon.github.io/blog/2015/08/27/epoch/ (I guess this could very well be regarded as a sort of application-specific GC, but, if anything, it feels closer to reference counting than a tracing GC).
- shmerl 11y agoThanks for the link!