public class SystemMemoryManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
MAXIMUM_MEMORY
Maximum memory for the IDV.
|
static long |
MINIMUM_MEMORY
Minimum memory for the IDV.
|
Modifier and Type | Method and Description |
---|---|
static long |
checkAndRepair(long memory)
Check and repair memory settings
|
static long |
convertToNumber(int percent)
Convenience method.
|
static float |
convertToPercent(long memory)
Convenience method.
|
static long |
getDefaultMemory()
The default when the user first starts up should be to use 80% between
the "low and high-water mark", but they should be allowed to increase
that to 100% of the high-water mark.
|
static long |
getTotalMemory()
For 32 bit OS, the total should be the minimum of the (total system
memory - 512Mb) and 1536MB.
|
static boolean |
isMemoryAvailable()
Checks if is memory is available for this JVM.
|
public static final long MINIMUM_MEMORY
public static final long MAXIMUM_MEMORY
public static boolean isMemoryAvailable()
public static long getTotalMemory()
isMemoryAvailable()
first. Must return at
least 512.public static long getDefaultMemory()
public static float convertToPercent(long memory)
memory
- the memorypublic static long convertToNumber(int percent)
percent
- the percentpublic static long checkAndRepair(long memory)
memory
- the memory setting