How Much Memory Does a Java Object Really Use? A JOL Walkthrough
This article explains how to calculate the exact memory footprint of a Java object using the OpenJDK JOL tool, covering object header composition, 8‑byte alignment, padding rules, and concrete examples for regular objects and char arrays.