|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MemoryMXBean
This interface exposes memory-specific information. It is a JRockit-specific extension of java.lang.management.MemoryMXBean.
Method Summary | |
---|---|
long |
getAllocatedHeapSize()
Returns the size of the heap that the JVM has allocated, in bytes. |
long |
getTotalPhysicalMemory()
Returns the total physical memory, in bytes. |
long |
getUsedPhysicalMemory()
Returns the committed heap size of the JVM in bytes. |
boolean |
isExitOnOutOfMemory()
Returns true if the JVM will exit with an error code instead of throwing an OutOfMemoryError, false if it throws an OutOfMemoryError. |
boolean |
isHeapSizeLocked()
This method returns false if the heap size is controlled by the JVM, false otherwise. |
void |
setAllocatedHeapSize(long heapSize)
This method will suggest the heapsize to be used. |
void |
setExitOnOutOfMemory(boolean exitOnOOM)
This method will change whether the JVM will exit with an error code, instead of throwing an OutOfMemoryError. |
void |
setHeapSizeLocked(boolean locked)
This method changes the JVM's ability to adaptively change the heap size. |
Methods inherited from interface java.lang.management.MemoryMXBean |
---|
gc, getHeapMemoryUsage, getNonHeapMemoryUsage, getObjectPendingFinalizationCount, isVerbose, setVerbose |
Method Detail |
---|
boolean isExitOnOutOfMemory()
Default is false.
void setExitOnOutOfMemory(boolean exitOnOOM) throws java.lang.SecurityException
In the case of JRockit, the exit code will be 72.
exitOnOOM
- if true, the JVM will exit when out of memory, if false, it
will throw an OutOfMemoryError.
SecurityPermission
- if you don't have the control permission set.
java.lang.SecurityException
void setHeapSizeLocked(boolean locked) throws java.lang.SecurityException
locked
- if true, the heap size will no longer be changed
by the JVM, if false, the JVM is in control over the heap size.
SecurityPermission
- if you don't have the control permission set.
java.lang.SecurityException
boolean isHeapSizeLocked()
SecurityPermission
- if you don't have the control permission set.void setAllocatedHeapSize(long heapSize) throws java.lang.SecurityException
heapSize
- the wanted heap size.
SecurityPermission
- if you don't have the control permission set.
java.lang.SecurityException
long getAllocatedHeapSize()
SecurityPermission
- if you don't have the control permission set.long getUsedPhysicalMemory()
long getTotalPhysicalMemory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |