How is it possible that minimal size of Java object is 8 bytes (only the object header),
What is the memory consumption of an object in Java?
if in the C++ class representing the java object,
http://hg.openjdk.java.net/jdk7/jdk7/hotspot/file/9b0ca45cd756/src/share/vm/oops/oop.hpp
i can see that the class has more members
class oopDesc {
friend class VMStructs;
private:
volatile markOop _mark; // this is the object header
union _metadata {
wideKlassOop _klass;
narrowOop _compressed_klass;
} _metadata; // what about size of this member?