Class ClassSize.MemoryLayout

java.lang.Object
org.apache.hadoop.hbase.util.ClassSize.MemoryLayout
Direct Known Subclasses:
ClassSize.UnsafeLayout
Enclosing class:
ClassSize

private static class ClassSize.MemoryLayout extends Object
MemoryLayout abstracts details about the JVM object layout. Default implementation is used in case Unsafe is not available.
  • Constructor Details

  • Method Details

    • headerSize

      int headerSize()
    • arrayHeaderSize

    • oopSize

      int oopSize()
      Return the size of an "ordinary object pointer". Either 4 or 8, depending on 32/64 bit, and CompressedOops
    • align

      public long align(long num)
      Aligns a number to 8.
      Parameters:
      num - number to align to 8
      Returns:
      smallest number >= input that is a multiple of 8
    • sizeOfByteArray

      long sizeOfByteArray(int len)