本文介绍了BEAM(Erlang VM)是否并行进行垃圾收集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在学习Elixir,并希望我了解垃圾回收在Erlang VM中的工作原理。
$ b
- 每个VM级进程都有自己的堆
- 如果该堆在终止之前没有填满,则被丢弃这个过程不需要GC
- 填充的堆是单独的垃圾,并行,所以GC不会停止世界, 解决方案 / div>
所以我相信erlang垃圾同时收集,也就是说,各种堆是独立于垃圾收集另一个。是否存在任何并行性取决于您的节点是否在多个核心上运行,但如果是,则垃圾回收并行完成,是的。
I'm learning Elixir and want to be sure I understand how garbage collection works in the Erlang VM.
My understanding is this:
- Each VM-level process has its own heap
- If that heap doesn't fill up before it terminates, it's discarded with the process and no GC is needed
- Heaps that do fill up are garbage collected individually, in parallel, so GC doesn't "stop the world", just that one process
Is this correct?
解决方案Evan Miller, creator of the popular Chicago Boss framework.
So I believe erlang garbage collects concurrently, that is, the various heaps are garbage collected independently of one another. Whether there is any parallelization depends on whether your node is running on multiple cores or not, but if so then the garbage collection is done in parallel, yes.
这篇关于BEAM(Erlang VM)是否并行进行垃圾收集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!