public final class MemoryUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static long |
estMemoryUsed(java.lang.Object obj)
How much space is used by this object ?
|
static int |
instanceSize(java.lang.Class c)
How much space is used ?
|
static long |
parseSize(java.lang.String text) |
static int |
sizeof(boolean b)
How much space is used ?
|
static int |
sizeof(byte b)
How much space is used ?
|
static int |
sizeof(char c)
How much space is used ?
|
static int |
sizeof(double d)
How much space is used ?
|
static int |
sizeof(float f)
How much space is used ?
|
static int |
sizeof(int i)
How much space is used ?
|
static int |
sizeof(long l)
How much space is used ?
|
static long |
sizeOf(java.lang.Object obj)
How much space is used ?
|
static int |
sizeof(short s)
How much space is used ?
|
static int |
sizeOfPointer()
The size of a pointer
|
@CheckReturnValue
@Nonnegative
public static long parseSize(@Nonnull
java.lang.String text)
text - the text to parse@CheckReturnValue @Nonnegative public static long estMemoryUsed(java.lang.Object obj)
obj - the object@CheckReturnValue @Nonnegative public static int sizeOfPointer()
@CheckReturnValue @Nonnegative public static int sizeof(boolean b)
b - the element@CheckReturnValue @Nonnegative public static int sizeof(byte b)
b - the element@CheckReturnValue @Nonnegative public static int sizeof(char c)
c - the element@CheckReturnValue @Nonnegative public static int sizeof(short s)
s - the element@CheckReturnValue @Nonnegative public static int sizeof(int i)
i - the element@CheckReturnValue @Nonnegative public static int sizeof(long l)
l - the element@CheckReturnValue @Nonnegative public static int sizeof(float f)
f - the element@CheckReturnValue @Nonnegative public static int sizeof(double d)
d - the element@CheckReturnValue @Nonnegative public static int instanceSize(java.lang.Class c)
c - the element@CheckReturnValue @Nonnegative public static long sizeOf(java.lang.Object obj)
obj - the elementstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.