public final class Memory
extends java.lang.Object
Miscellaneous tools for memory manager control. Mainly for debugging and tests.
This class can be executed since JVM 1.0 and can be compiled since JDK 1.1.
Modifier and Type | Field and Description |
---|---|
static int |
MEMORY_OF_BYTE |
static int |
MEMORY_OF_CHAR |
static int |
MEMORY_OF_DOUBLE |
static int |
MEMORY_OF_FLOAT |
static int |
MEMORY_OF_INT |
static int |
MEMORY_OF_LONG |
static int |
MEMORY_OF_SHORT |
Modifier and Type | Method and Description |
---|---|
static long |
free() |
static long |
gc() |
static long |
gc(boolean aggressive,
boolean printInfo) |
static java.lang.String |
info() |
static java.lang.String |
info(long free,
long total,
boolean bytePrecision) |
static int |
memoryOfPrimitive(java.lang.Class clazz) |
static long |
total() |
static long |
used() |
public static final int MEMORY_OF_CHAR
public static final int MEMORY_OF_BYTE
public static final int MEMORY_OF_SHORT
public static final int MEMORY_OF_INT
public static final int MEMORY_OF_LONG
public static final int MEMORY_OF_FLOAT
public static final int MEMORY_OF_DOUBLE
public static int memoryOfPrimitive(java.lang.Class clazz)
public static long used()
public static long free()
public static long total()
public static java.lang.String info()
public static java.lang.String info(long free, long total, boolean bytePrecision)
public static long gc()
public static long gc(boolean aggressive, boolean printInfo)