Interface ObjectSizeCalculator.MemoryLayoutSpecification

Enclosing class:
ObjectSizeCalculator

public static interface ObjectSizeCalculator.MemoryLayoutSpecification
Describes constant memory overheads for various constructs in a JVM implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the fixed overhead of an array of any type or length in this JVM.
    int
    Returns the fixed overhead of for any Object subclass in this JVM.
    int
    Returns the quantum field size for a field owned by an object in this JVM.
    int
    Returns the fixed size of an object reference in this JVM.
    int
    Returns the quantum field size for a field owned by one of an object's ancestor superclasses in this JVM.
  • Method Details

    • 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.