Skip to lesson content

Course · 10 lessons

JVM from the inside out

Build a mental model of the runtime, then follow memory from allocation to diagnosis.

Start exploring →

About this track

This is a small preview of a connected learning experience. Use the contents to move between ideas without losing sight of the bigger picture. Follow a guided sequence.

The learning map

01

Foundations

What the JVM actually is

Meet the runtime behind your Java program, and get to know the parts that keep it running.

02

Foundations

JVM process memory — heap is only one part

Learn where a JVM process uses memory, why a healthy heap can coexist with a container OOM, and which evidence to collect first.

03

Foundations

Object layout inside the heap

See what a Java object actually contains in memory, why its fields do not determine its full size, and where headers, references, and alignment fit.

04

Foundations

GC roots, reachability, and why GC is graph traversal

Follow references from the root set to discover live objects, understand collectible cycles, and diagnose unwanted retention.

05

Foundations

Mark-Sweep vs Mark-Compact vs Copying GC

Compare three foundational reclamation strategies, and see how fragmentation, object movement, and survival rate shape GC design.

06

Foundations

Generational GC — Eden, Survivor, and promotion

See how object lifetimes shape young collection, survivor copying, promotion, and the references that connect generations.

07

Foundations

Write barriers, card tables, and remembered sets

See how HotSpot tracks reference changes so collectors can find incoming references without repeatedly scanning the entire heap.

08

Foundations

TLABs and why object allocation is usually very cheap

See how HotSpot turns ordinary object allocation into a mostly thread-local bump-pointer operation, and why allocation rate, allocation cost, and retention are different questions.

09

Foundations

Escape analysis and scalar replacement

See how HotSpot can prove that some Java objects need no heap allocation, preserve their fields as scalar values, and remove unobservable locking.

010

Foundations

Class loading lifecycle

A preview of loading, linking, verification, preparation, resolution, and initialization: how class-file bytes become runtime types.