[英]Java Full GC - Floating Garbage?
Currently I am learning about GC in Java, but I need some clarification.目前我正在学习 Java 中的 GC,但我需要一些说明。 Let's say we have situation like on this picture:
假设我们在这张图片上有这样的情况:
According to this website first runs DefNew and after that Tenured GC.根据这个网站,首先运行 DefNew,然后是 Tenured GC。 In that case:
在这种情况下:
How does it works after all?它到底是如何工作的? I was thinking about dirty cards, but only Object C would be marked, because it was changed (deleted reference to Object B).
我在考虑脏卡,但只有对象 C 会被标记,因为它被更改了(删除了对对象 B 的引用)。
From an article about "nepotism" problem来自一篇关于“裙带关系”问题的文章
This is 'pathological' because ANY promoted node will result in the promotion of ALL following nodes until a GC resolves the issue.
这是“病态的”,因为任何提升的节点都将导致所有后续节点的提升,直到 GC 解决问题。
So I guess it will be promoted to Old gen first, then collected.所以我猜它会先晋升为老一代,然后再收集。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.