Skip to content

JVM Memory

The stack and its frames, what an object really costs, and how virtual threads change allocation.

3 of 3 parts published

  1. Part 1 of 3

    JVM Memory Fundamentals: The Stack, the Heap and Stack Frames

    How the JVM splits memory between the stack and the heap, and what lives inside every stack frame: local variables, the operand stack, dynamic linking and the exception table.

    5 min read

  2. Part 2 of 3

    JVM Object Headers and Java 25 Compact Headers

    Why a Point with two ints takes 24 bytes, what the mark word stores, and how Java 25's compact object headers cut the header from 12 to 8 bytes.

    5 min read

  3. Part 3 of 3

    Virtual Threads and JVM Memory

    Why virtual thread stacks live on the heap, what that does to allocation and GC pressure, and how to tune memory for virtual-thread workloads.

    2 min read