1.2.4. Garbage Collection
来源:互联网 发布:阿里云上海节点 编辑:程序博客网 时间:2024/06/06 03:19
Memory is a shared and limited resource and should not be wasted, particularly in the kernel because it does not use virtual memory. Most kernel subsystems implement some sort of garbage collection to reclaim the memory held by unused or stale data structure instances. Depending on the needs of any given feature, you will find two main kinds of garbage collection:
内存是需要共享的有限资源,不应该被浪费,特别是对内核来说,因为内核模块是不能用虚拟内存的。大部分内核子系统应用某类垃圾回收机制来回收被过时或不再有效的数据实例持有的内存。依赖于功能需求,一般有两种主要的垃圾回收方式:
Asynchronous(异步)
This type of garbage collection is unrelated to particular events. A timer that expires regularly invokes a routine that scans a set of data structures and frees the ones considered eligible for deletion. The conditions that make a data structure eligible for deletion depend on the features and logic of the subsystem, but a common criterion is the presence of a null reference count.
这种类型的垃圾回收并不与特定的事件相关联。一个定时器定时调用一段程序扫描数据结构集合,释放那些被认为适合被删除的数据结构。数据结构符合删除的条件依赖于子系统的功能和逻辑判定。但是一个普遍标准是引用计数变为空
Synchronous(同步)
There are cases where a shortage of memory, which cannot wait for the asynchronous garbage collection timer to kick in, triggers immediate garbage collection. The criteria used to select the data structures eligible for deletion are not necessarily the same ones used by asynchronous cleanup (for instance, they could be more aggressive). See Chapter 33 for an example.
当突发内存短缺,来不及等待异步方式垃圾回收释放资源时,触发器立刻开始做垃圾回收。同步回收判定数据结构可清理的标准并不需要和
异步方式一致(有可能是更有效的)
In Chapter 7, you will see how the kernel manages to reclaim the memory used by initialization routines and that is no longer needed after they have been executed.
-----------------
reclaim [riˈkleim] vt.要回;开垦(荒地);回收
stale [steil] a.不新鲜的;陈腐的,过时的
asynchronous [ei'siŋkrənəs] 1.非同期的 2.【电】异步的
expire [iks'paiə] 1.满期,届期;(期限)终止 2.呼气,吐气 3.【书】断气,死亡
invoke [inˈvəuk] vt.恳求 唤起;引起;造成 ,诉诸
eligible [ˈelidʒəbəl] a.有条件被选中的;(尤指婚姻等)合适(意)的
criterion [kraiˈtiəriən] n.(批评、判断等的)标准,准则
presence [ˈprezəns] n.出席,到场,存在;仪表,仪态
trigger [ˈtrigə] n.扳机;引起反应的行动 vt.触发,引起
aggressive [əˈgresiv] a.侵犯(略)的,挑衅的;敢做敢为的
- 1.2.4. Garbage Collection
- Garbage Collection
- Garbage Collection
- Garbage Collection
- garbage collection
- Garbage Collection
- Garbage Collection
- Garbage Collection
- Garbage Collection
- Garbage Collection
- Garbage Collection
- 3.Garbage Collection
- TIJ Note - Garbage collection
- .NET Garbage Collection
- .NET Garbage Collection Concepts
- JVM Garbage Collection
- The DotNet Garbage Collection
- .Net Garbage Collection
- 中国移动12580业务(战略部署)之我所见
- 一个Excel技巧,及其蕴含的编程规范思想
- sleep
- SQL Server 安装:以前的某个程序安装已在安装计算机上创建挂起的文件操作
- 免费在线求职指导讲座!兄弟连与CSDN携手助您职场前行!
- 1.2.4. Garbage Collection
- Hibernate批量处理
- 从《风声》想到的信仰问题
- Ubuntu下安装C/C++帮助文档
- 1.2.5. Function Pointers and Virtual Function Tables (VFTs) 函数指针和虚函数表
- DSP Builder系统设计工具
- 关于tomcat日志输入两遍的问题
- 最近感觉好辛苦
- CSS样式基础语法