Jamm provides MemoryMeter, a java agent to measure actual object memory use including JVM overhead.
'com.github.stephenc:jamm:0.2.5'
<dependency>
<groupId>com.github.stephenc</groupId>
<artifactId>jamm</artifactId>
<version>0.2.5</version>
</dependency>
<dependency org="com.github.stephenc" name="jamm" rev="0.2.5"/>
"com.github.stephenc", "jamm", "0.2.5"