Package org.apache.hadoop.hbase.util
Class ClassSize.MemoryLayout
java.lang.Object
org.apache.hadoop.hbase.util.ClassSize.MemoryLayout
- Direct Known Subclasses:
ClassSize.UnsafeLayout
- Enclosing class:
- ClassSize
MemoryLayout abstracts details about the JVM object layout. Default implementation is used in
case Unsafe is not available.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
align
(long num) Aligns a number to 8.(package private) int
(package private) int
(package private) int
oopSize()
Return the size of an "ordinary object pointer".(package private) long
sizeOfByteArray
(int len)
-
Constructor Details
-
MemoryLayout
private MemoryLayout()
-
-
Method Details
-
headerSize
int headerSize() -
arrayHeaderSize
int arrayHeaderSize() -
oopSize
int oopSize()Return the size of an "ordinary object pointer". Either 4 or 8, depending on 32/64 bit, and CompressedOops -
align
Aligns a number to 8.- Parameters:
num
- number to align to 8- Returns:
- smallest number >= input that is a multiple of 8
-
sizeOfByteArray
-