本文介绍了为什么大多数JVM gcs不使用refcounts?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Counting references must be done outside the object.
Counting references is slow. Even slower to deal w/ cyclic references but that's not impossible. Still slow.
Counting references is actually very slow since it must use CAS + loop
Not-Counting references is easier to implement and it's faster, esp. with some OS memory page tricks.
Reference counting can be removed altogether by escape analysis, provided the object doesn't escape.
为什么他们不需要它们,如果有人决定实现一个使用它们的虚拟机,他们可能会面临哪些问题? 解决方案
>
Why don't they need them, and if someone decided to implement a VM that used them, what problems might they face?
解决方案
更多推荐
为什么大多数JVM gcs不使用refcounts?
发布评论