首页> 外国专利> Method and apparatus for performing generational garbage collection using middle-aged objects

Method and apparatus for performing generational garbage collection using middle-aged objects

机译:使用中年对象执行世代垃圾收集的方法和设备

摘要

A method and apparatus are provided for the efficient management of remembered sets in a generational garbage collection scheme. The present invention detects when an old object has a pointer to a young object, and needs to be added to the remembered set. A write buffer and a temporary buffer are used to create and maintain the remembered set. Entries in the write and temporary buffers are used as part of the root set for creating the remembered set for the next garbage collection. A barrier bit associated with each object differentiates generations in the generational garbage collection scheme and is used to determine whether to make an entry into a write buffer when a reference to another object is stored into an object. Objects that have survived one or more collections, but not the minimum number, N, of collections to be considered an old object are referred to as “middle-aged” objects. During a minor garbage collection, the write buffer is scanned. Objects identified in the write buffer are transferred to the remembered set for the next cycle if the object is (i) an old object pointing to a younger object, or (ii) a middle-aged object that is determined to be live. Middle-aged objects identified in the write buffer that are not yet known to be live are transferred to the temporary buffer. At the end of the minor collection, the temporary buffer is processed and objects that are then known to be live are transferred into the remembered set.
机译:提供了一种用于在世代垃圾收集方案中有效管理记忆集的方法和设备。本发明检测何时旧对象具有指向年轻对象的指针,并且需要将其添加到记住的集合中。写缓冲区和临时缓冲区用于创建和维护记住的集。写缓冲区和临时缓冲区中的条目用作根集的一部分,用于为下一个垃圾回收创建记住的集。与每个对象关联的屏障位区分了世代垃圾收集方案中的世代,并用于在将对另一个对象的引用存储到对象中时确定是否在写缓冲区中进行输入。在一个或多个集合中幸存下来但没有最小数量N的对象被认为是旧对象的对象称为“中年”。对象。在次要垃圾回收期间,将扫描写缓冲区。如果对象是(i)指向较年轻对象的旧对象,或(ii)被确定为活动的中年对象,则在下一个循环中将在写缓冲区中标识的对象转移到记忆集中。在写缓冲区中标识的尚不存在的中年对象将传输到临时缓冲区。在次要收集的末尾,将处理临时缓冲区,然后将已知处于活动状态的对象传输到已记住的集中。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号