Memory usage in Java

how to query the memory use of Java objects, taking
advantage of the Java Instrumentation framework to ask the JVM for an object's usage, with a link
to the Classmexer agent, which provides additional calls to make
querying memory usage objects and their subobjects easier.