Java Garbage Collection

Garbage Collection automatically reclaims heap memory occupied by objects that are no longer reachable by any live thread. 1. Why GC exists Manual memory management is hard and error-prone: The JVM uses GC to: Production impact: 2. Heap structure (Young, Old, Metaspace) Modern HotSpot heap (simplified view): +———————————————————+| Java Heap || || +——————-+ +—————————–+ || […]

JVM

The JVM is the runtime environment that loads, verifies, optimizes, and executes Java bytecode on a specific machine. 1. What the JVM is responsible for At a high level, the JVM is responsible for: Why this exists: Real-world example: 2. JVM architecture (high level) A conceptual view: +————————————————————–+| JVM PROCESS || || +——————–+ +——————————-+ || […]