哪些现代浏览器使用“标记扫描"算法进行垃圾收集? [英] Which modern browsers use Mark and Sweep Algorithm for Garbage Collection?

查看:50
本文介绍了哪些现代浏览器使用“标记扫描"算法进行垃圾收集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在进行垃圾收集时,我遇到了引用计数 Mark&扫描 GC算法.
网上的一些研究表明,引用计数已成为过去,如今的大多数浏览器都采用了标记和扫描".根据文章此处

While going through garbage collection, I came across Reference Counting and Mark & Sweep GC Algorithms.
Some research on the web says that Reference Counting is a thing of the past and most of the browsers today have adapted Mark and Sweep. As per the article here

Since 2012, JavaScript Engine’s have adapted this algorithm over Reference-counting garbage collection.

虽然我还没有找到相同的标准文档,但是我很想知道以下内容:

While I haven't found any standard documentation for the same, I am curioud to know following:

  1. 除了周期性依赖之外,还有其他原因导致我们脱离引用计数而采用Mark& ;?扫一扫?
  2. 所有现代浏览器(Chrome | Firefox | Safari | Edge | IE)是否都使用标记并扫描"?

推荐答案

引用

自2012年起,所有现代浏览器都附带标记清除垃圾收集器.最近几年在JavaScript垃圾收集领域(世代/增量/并行/并行垃圾收集)中所做的所有改进都是该算法的实现改进,但不是垃圾收集算法本身的改进,也不是对when的定义的减少.不再需要对象".

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 no longer needed".

这篇关于哪些现代浏览器使用“标记扫描"算法进行垃圾收集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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