search

Home  >  Q&A  >  body text

java - 并发标记清除的问题

问题:CMS并发标记清除
上图中初始标记和并发标记阶段具体做了什么,作者两句话代过,并且两句话的意思感觉还是一样的,没什么区别。

告诉我作者是不是在跟我打马虎眼??

两个阶段怎么理解,有什么区别?望各位指点

问题解决了:
书中提到的是直接与相连的节点

伊谢尔伦伊谢尔伦2805 days ago720

reply all(1)I'll reply

  • PHPz

    PHPz2017-04-18 10:58:10

    The author's meaning is very obvious. How can it be considered as a sloppy statement? The initial marking is to find all GC root objects (usually static objects in the constant area and objects in the Java method stack). The concurrent marking is to use multi-threads to perform a tracing search on each GC root object, that is, to find other objects in the heap. All objects that can be associated with it. Therefore, the workload of the second stage is very large, and using concurrent methods can greatly speed up the gc time.

    reply
    0
  • Cancelreply