com.twitter.common.objectsize
Interface ObjectSizeCalculator.MemoryLayoutSpecification

Enclosing class:
ObjectSizeCalculator

public static interface ObjectSizeCalculator.MemoryLayoutSpecification

Describes constant memory overheads for various constructs in a JVM implementation.


Method Summary
 int getArrayHeaderSize()
          Returns the fixed overhead of an array of any type or length in this JVM.
 int getObjectHeaderSize()
          Returns the fixed overhead of for any Object subclass in this JVM.
 int getObjectPadding()
          Returns the quantum field size for a field owned by an object in this JVM.
 int getReferenceSize()
          Returns the fixed size of an object reference in this JVM.
 int getSuperclassFieldPadding()
          Returns the quantum field size for a field owned by one of an object's ancestor superclasses in this JVM.
 

Method Detail

getArrayHeaderSize

int getArrayHeaderSize()
Returns the fixed overhead of an array of any type or length in this JVM.

Returns:
the fixed overhead of an array.

getObjectHeaderSize

int getObjectHeaderSize()
Returns the fixed overhead of for any Object subclass in this JVM.

Returns:
the fixed overhead of any object.

getObjectPadding

int getObjectPadding()
Returns the quantum field size for a field owned by an object in this JVM.

Returns:
the quantum field size for an object.

getReferenceSize

int getReferenceSize()
Returns the fixed size of an object reference in this JVM.

Returns:
the size of all object references.

getSuperclassFieldPadding

int getSuperclassFieldPadding()
Returns the quantum field size for a field owned by one of an object's ancestor superclasses in this JVM.

Returns:
the quantum field size for a superclass field.