课程: Java Memory Management: Garbage Collection, JVM Tuning, and Spotting Memory Leaks
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Garbage collection phase: Sweeping - Java教程
课程: Java Memory Management: Garbage Collection, JVM Tuning, and Spotting Memory Leaks
Garbage collection phase: Sweeping
- [Instructor] After the marking of the life objects, it's time to delete the leftover objects that were not marked. This deletion is called sweeping in the garbage collection slang. And of course it wouldn't be fun if we only had one way of sweeping. Instead we have three options for sweeping, normal sweeping, sweeping with compacting and sweeping with copying. Let's start out normal. So let's look at this memory here and say that these bits, they are not marked and so they can be deleted. This is what happens after deletion. It's the old memory but with the available blocks of free space in between. So if we want to store a new bit like this one, the JVM is going to have a look at heap and it's going to figure out that it can be stored over there like this. But say, we'd like to store a bit of a bigger one. Then it cannot fit in between the gaps. So it can be stored at the end over there like this. And say, we want to store an even bigger value. And technically there would be enough…
内容
-
-
-
(已锁定)
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 秒
-
(已锁定)
-
-
-