4 ms·
I wonder how JVM garbage collection impacts real-time systems vs. Erlang.
by lttlrck 14y ago
I wonder how JVM garbage collection impacts real-time systems vs. Erlang.
- rdtsc 14y agoUsually badly. Erlang got one thing very right -- private heaps for each process. So when garbage collectors run they never have to stop all the processes and collect, and that is very important in types of system Erlang runs in. I know Java has "pauseless" garbage collector but I think that is just marketing talk. Given how references to objects can be shared between threads I don't see a way for it to work.
- petrohi 14y agoErlang VM is much friendlier to garbage collection. For example immutability removes one of the biggest overheads of GC--tracking reference mutations. Process isolation allows to run garbage collection concurrently and without employing esoteric techniques. Many processes are short lived and never reach GC point, when they terminated memory is reclaimed wholesale.