Skip to content

JVM Internals & Memory Management

Core Topics

JVM Architecture

  • Class Loader Subsystem (Bootstrap, Extension, Application)
  • Runtime Data Areas (Method Area, Heap, Stack, PC Registers, Native Method Stack)
  • Execution Engine (Interpreter, JIT Compiler, Garbage Collector)

Class Loading Mechanism

  • Loading → Linking (Verification, Preparation, Resolution) → Initialization

Memory Management

  • Heap Structure (Young Generation: Eden, Survivor; Old Generation; Metaspace)
  • Stack memory and stack frames
  • Method Area and Runtime Constant Pool

JVM Monitoring & Profiling

  • JVisualVM, JConsole, JProfiler, YourKit
  • Java Flight Recorder (JFR)

Key Internals to Understand

  • Bytecode structure and execution
  • JIT compilation strategies (C1, C2 compilers)
  • Escape analysis and scalar replacement
  • How native methods work (JNI)

Notes