Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

Java Memory Management

via LinkedIn Learning

Overview

Learn how memory works in Java. In this hands-on course, explore fundamental concepts to help you optimize your code and quickly find and fix any memory errors that still occur.

Syllabus

Introduction
  • Introduction
1. How Memory Works in Java
  • Why memory is important
  • The role of the stack
  • The role of the Heap
2. Values and References
  • Passing variables by value
  • How objects are passed
  • The final keyword
  • Memory exercise
  • Exercise walkthrough
3. Escaping References
  • What are escaping references?
  • An escaping references example
  • How to avoid escaping references with collections
  • Avoiding escaping references with custom objects, part 1
  • Avoiding escaping references with custom objects, part 2
  • Escaping references exercise
  • Exercise walkthrough
4. Introduction to Garbage Collection
  • String pools
  • Garbage eligibility
  • The gc() and finalize() methods
  • Understanding what soft leaks are
  • Detecting soft leaks
5. Generational Garbage Collection
  • Mark and sweep
  • Generational garbage collection
  • Using the Visual GC tool to view a soft leak
  • Using the Memory Analyzer tool
  • PermGen and the Metaspace
6. Tuning the Virtual Machine
  • Heap size
  • PermGen size
  • Garbage collection and generation sizes
  • Generating heap dumps
  • Choosing a garbage collector
7. Hunting for a Memory Leak
  • Introducing the example application
  • Monitoring the application
  • Fixing a memory leak
Conclusion
  • Course summary

Taught by

Matt Greencroft

Reviews

4.8 rating at LinkedIn Learning based on 495 ratings

Start your review of Java Memory Management

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.