Garbage Collection is the process of finding memory that is no longer in use and freeing it so that subsequent allocation requests can use it. There are a number of strategies for this including: Mark and Sweep, Mark Sweep Compact, and Mark and Copy. Fragmentation of memory where the free space is scattered across memory in little pieces can result from garbage collection, so we need strategies for dealing with it. Finally, combining these strategies with the Generational Hypothesis allows us to reduce the time garbage collection takes which is good because, while garbage collection is running, we have to "stop the world" and prevent everything else from running. I include an overview of Java's garbage collection to show how all of these pieces fit together.
In this video I'll walk you through:
- what is garbage collection
- three strategies for garbage collection
- pros and cons for each strategy
- How you can use this knowledge as a developer who isn't building garbage collection algorithms.
TIMESTAMPS
0:00 What is a garbage collection?
0:49 Mark and Sweep
2:19 Fragmentation
2:45 Mark Sweep Compact
4:07 Mark and Copy
5:17 The Generational Hypothesis
6:17 Generational Garbage Collection
8:08 Java's Garbage Collection
9:13 Why do we need to know about this?
ABOUT MY CHANNEL
My channel is about good software engineering practices. I cover introductions to programming in C and Java. But I also have lots of software and computer engineering topics like PIC programming, advanced programming techniques, and things that distinguish good code from code that works.
Check out our channel here:
[ Ссылка ]
Don’t forget to like and subscribe!
CHECK OUT MY OTHER VIDEOS:
C Programming Playlist: [ Ссылка ]
Intro to Java Playlist: [ Ссылка ]
Software Engineering Topics Playlist: [ Ссылка ]
Ещё видео!