zoukankan      html  css  js  c++  java
  • Markandsweep algorithm

    Mark-and-sweep algorithm

      This algorithm reduces the definition of "an object is not needed anymore" to "an object is unreachable".

      从"an object is not needed anymore" 进化到 "an object is unreachable".

      This algorithm assumes the knowledge of a set of objects called roots  Periodically, the garbage-collector will start from these roots, find all objects that are referenced from these roots, then all objects referenced from these, etc. Starting from the roots, the garbage collector will thus find all reachable objects and collect all non-reachable objects.

      从roots扫描,找出所有可引用点,同时剩下的也就是不可引用点。

     

      As of 2012, all modern browsers ship a mark-and-sweep garbage-collector. All improvements made in the field of JavaScript garbage collection (generational/incremental/concurrent/parallel garbage collection) over the last few years are implementation improvements of this algorithm, but not improvements over the garbage collection algorithm itself nor its reduction of the definition of when "an object is not needed anymore".

      近几年的GC改进都是基于此算法的改进。

  • 相关阅读:
    1292
    explicit_defaults_for_timestamp
    比较好的平台工具
    git回退到指定版本的代码
    解决catalina.out文件过大的方法
    json字符串转化成对象列表数据
    Java LIST做批量分组切割
    Activiti数据库表结构
    MySQL修改数据库时区
    集合工具类的使用
  • 原文地址:https://www.cnblogs.com/tekkaman/p/2578131.html
Copyright © 2011-2022 走看看