cytoscape.util
Class MemoryReporter
java.lang.Object
cytoscape.util.MemoryReporter
public class MemoryReporter
- extends Object
A class used to track JVM memory usage.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemoryReporter
public MemoryReporter()
getUsedMemory
public static long getUsedMemory()
- Returns:
- the actually used memory in bytes
getMaxMemory
public static long getMaxMemory()
- Returns:
- the maximum amount of memory in bytes that can be used for memory management.
If not available, -1 will be returned instead
"This amount of memory is not guaranteed to be available for memory management if it is
greater than the amount of committed memory. The Java virtual machine may fail to
allocate memory even if the amount of used memory does not exceed this maximum size."
getCommittedMemory
public static long getCommittedMemory()
- Returns:
- the "committed" amount of memory for the current JVM instance in bytes
"This amount of memory is guaranteed for the Java virtual machine to use."
Copyright 2010 Cytoscape Consortium. All rights reserved.