// Get current size of heap in bytes
long heapSize = Runtime.getRuntime().totalMemory();
// Get maximum size of heap in bytes.
long heapMaximumSize = Runtime.getRuntime().maxMemory();
// Get amount of free memory within the heap in bytes.
long heapFreeSize = Runtime.getRuntime().freeMemory();
Monday, June 22, 2009
How to Get the Size of the Java Memory Heap
10:52 PM
Posted by
Techsavy
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment