课程: Java Memory Management: Garbage Collection, JVM Tuning, and Spotting Memory Leaks
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Garbage collection phase: Marking - Java教程
课程: Java Memory Management: Garbage Collection, JVM Tuning, and Spotting Memory Leaks
Garbage collection phase: Marking
- [Narrator] So imagine we're having a heap full of objects that leave out the Java garbage collector for a while here, and try to think like garbage collectors ourselves. So how are we going to find out which objects don't have a connection to the stack? Well, here's the stack, and for now for just a second, pause this video and pretend to be the garbage collector. How to find out which ones don't have a connection. Frankly, we cannot do this in one step. We'll first have to sort out which ones do have a connection to the stack, and if we have identified all the reference on the stack, we know which objects have a connection to the stack. Next, we're going to see what references of these objects are, and also these objects have reference to the stack, indirectly. We repeat this until we have checked all the nested references, and then we know what objects have a connection to the stack. And with that knowledge we also know what objects don't have a connection to the stack. Namely…
内容
-
-
-
(已锁定)
Introduction to the garbage collector2 分钟 38 秒
-
(已锁定)
Eligible for garbage collection1 分钟 39 秒
-
(已锁定)
Garbage collection phase: Marking2 分钟 23 秒
-
(已锁定)
Garbage collection phase: Sweeping2 分钟 39 秒
-
(已锁定)
Different generations on the heap6 分钟 3 秒
-
(已锁定)
Generational garbage collection2 分钟 51 秒
-
(已锁定)
Different garbage collection implementations5 分钟 15 秒
-
(已锁定)
Monitoring garbage collection3 分钟 14 秒
-
(已锁定)
Solution: Eligible for garbage collection45 秒
-
(已锁定)
-
-
-