public class UnsafeUtil extends Object
| 构造器和说明 |
|---|
UnsafeUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static long |
addressOf(Object o)
Get the memory address of the given object.
|
static long |
getHeaderSize() |
static sun.misc.Unsafe |
getUnsafe() |
static boolean |
isUsecompressedOops()
Determined whether the vm use -XX:+UseCompressedOops.
|
static long |
refSize()
Get the size of reference.
|
static long |
refSizeOf(Class<?> clz)
Get the size of reference.
|
static long |
sizeOf(Class<?> clz)
Measure the size of the given class.
|
public static sun.misc.Unsafe getUnsafe()
public static long addressOf(Object o)
o - public static long sizeOf(Class<?> clz)
clz - public static long refSize()
Unsafe.addressSize()public static long refSizeOf(Class<?> clz)
clz - public static long getHeaderSize()
public static boolean isUsecompressedOops()
Copyright © 2017. All rights reserved.