Erlang 中的垃圾收集和内存管理 [英] Garbage collection and memory management in Erlang

查看:23
本文介绍了Erlang 中的垃圾收集和内存管理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解有关 Erlang/OTP 中垃圾回收 (GC) 和内存管理的技术细节.

I want to know technical details about garbage collection (GC) and memory management in Erlang/OTP.

但是,我在 erlang.org 及其文档上找不到.

But, I cannot find on erlang.org and its documents.

我在网上找到了一些非常笼统地谈论GC的文章,例如使用了什么垃圾收集算法.

I have found some articles online which talk about GC in a very general manner, such as what garbage collection algorithm is used.

推荐答案

算法参考论文:One Pass Real-Time Generational Mark-Sweep Garbage Collection (1995) 作者:Joe Armstrong 和 Robert Virding1995(在 CiteSeerX)

A reference paper for the algorithm: One Pass Real-Time Generational Mark-Sweep Garbage Collection (1995) by Joe Armstrong and Robert Virding in 1995 (at CiteSeerX)

摘要:

传统的标记清除垃圾收集算法在算法的标记阶段终止之前不允许回收数据.对于不允许破坏性操作的语言类,我们可以安排堆中的所有指针总是向后指向较旧的"指针.数据.在本文中,我们提出了一个简单的方案,用于使用单遍标记扫描收集器回收此类语言类的数据.我们还展示了如何修改简单的方案,以便以增量方式完成收集(使其适合实时收集).在此之后,我们将展示如何修改收集器以进行分代垃圾收集,最后展示如何将该方案用于具有并发进程的语言.1

Traditional mark-sweep garbage collection algorithms do not allow reclamation of data until the mark phase of the algorithm has terminated. For the class of languages in which destructive operations are not allowed we can arrange that all pointers in the heap always point backwards towards "older" data. In this paper we present a simple scheme for reclaiming data for such language classes with a single pass mark-sweep collector. We also show how the simple scheme can be modified so that the collection can be done in an incremental manner (making it suitable for real-time collection). Following this we show how the collector can be modified for generational garbage collection, and finally how the scheme can be used for a language with concurrent processes.1

这篇关于Erlang 中的垃圾收集和内存管理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆