gc 算法的关键
The best garbage collection routines known have an execution time essentially of the form c_1N + c_2M
, where c_1 and c_2 are constants, N is the number of nodes marked, and M is the total number of nodes in the memory. Thus M-N is the number of free nodes found, and the amount of time required to return these nodes to free storage is (c_1N + c_2M)/(M-N)
per node.
Hence we can see to what extent garbage collection is inefficient when memory becomes full, and how it is correspondingly efficient when the demand on memory is light.
https://tech.meituan.com/2016/09/23/g1.html
agc 算法种类
gc 算法标记方法
gc 算法的 stw
https://zhuanlan.zhihu.com/p/30175684
https://medium.com/software-under-the-hood/under-the-hood-java-peak-safepoints-dd45af07d766