Understanding the Java Virtual Machine: Memory Management

This course covers all aspects of garbage collection in Java, including how memory is split into generations and managed and how the different collectors do their job. We also cover the classes you can use to interact with the garbage collection, such as Soft, Weak, and PhantomReference.
Course info
Rating
(466)
Level
Intermediate
Updated
May 8, 2020
Duration
1h 37m
Table of contents
Description
Course info
Rating
(466)
Level
Intermediate
Updated
May 8, 2020
Duration
1h 37m
Description

Garbage Collection (GC) is a fundamental part of Java. Understanding how GC works is core to understanding how the Java Virtual Machine (JVM) works and will help you write better applications and to improve the performance of those applications. This course will look at all aspects of garbage collection, including looking at what 'young' and 'old' generations are, how the JVM moves objects between eden and survivor spaces, how memory is promoted into the 'old' generation, how different garbage collectors work, and how they affect the running of your application. We will also look at 'card tables' and how they help manage memory in the old generation. We will examine each of the garbage collectors including the serial and parallel collectors; the CMS collector and the G1 collector. We cover the tools you can use to monitor GC including jstat and VisualVM. Finally we look at ways you interact with the GC through classes Such as Soft, Weak, and PhantomReference and their associated helpers ReferenceQueue and WeakHashMap.

About the author
About the author

Kevin has spent way too many years in the software industry. Starting on PL/1 on IBM mainframes then graduating through dBase IV to Windows and eventually onto Java, .Net and now JavaScript where he finally thinks he has found a home until the next new shiny comes along.

More from the author
Introduction to the Java API for Web Sockets
Intermediate
1h 53m
Jun 5, 2020
Architecting Web Applications with Spring
Intermediate
1h 58m
Jun 2, 2020
More courses by Kevin Jones
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi, everyone. My name is Kevin Jones, and welcome to my course, Understanding the Java Virtual Machine: Memory Management. I am a developer and owner at Rock Solid Knowledge, a software development company based in the United Kingdom. One of the core aspects of the Java virtual machine is memory management, and it's important to understand how memory management works in Java if you want your applications to perform as well as possible. Java has different garbage collectors, and each behaves differently and has different characteristics. Some of the major topics we'll cover in this course include understanding how the different garbage collectors work, understanding Eden, survivor, and tenured spaces used by the garbage collector, see the tools that you can use to monitor the garbage collector, and learn how to interact with the garbage collector using reference classes and the cleaner class. By the end of this course, you understand how the different garbage collector works in Java and how to interact with the garbage collector. Before beginning the course, you should be familiar with the Java language. I hope you'll join me on this journey to understand garbage collection with the Understanding the Java Virtual Machine: Memory Management course at Pluralsight.