public class ClassSize extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ARRAY
Array overhead
|
static int |
ATOMIC_INTEGER
Overhead for AtomicInteger
|
static int |
BYTE_BUFFER
Overhead for ByteBuffer
|
static int |
CONCURRENT_HASHMAP
Overhead for ConcurrentHashMap
|
static int |
CONCURRENT_HASHMAP_ENTRY
Overhead for ConcurrentHashMap.Entry
|
static int |
CONCURRENT_HASHMAP_SEGMENT
Overhead for ConcurrentHashMap.Segment
|
static int |
OBJECT
Object overhead is minimum 2 * reference size (8 bytes on 64-bit)
|
static int |
REFERENCE
Reference size is 8 bytes on 64-bit, 4 bytes on 32-bit
|
static int |
STRING
String overhead
|
Constructor and Description |
---|
ClassSize() |
Modifier and Type | Method and Description |
---|---|
static int |
align(int num)
Aligns a number to 8.
|
static long |
align(long num)
Aligns a number to 8.
|
public static final int ARRAY
public static final int BYTE_BUFFER
public static final int OBJECT
public static final int REFERENCE
public static final int STRING
public static final int CONCURRENT_HASHMAP
public static final int CONCURRENT_HASHMAP_ENTRY
public static final int CONCURRENT_HASHMAP_SEGMENT
public static final int ATOMIC_INTEGER
public static int align(int num)
num
- number to align to 8public static long align(long num)
num
- number to align to 8Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.