The ability to use memory related methods from java.lang.Runtime class to get the free memory, total memory and maximum heap memory in Java.
From using these methods, we know how much percent of the heap is used and how much heap space is outstanding.
-Runtime.freeMemory() return the amount of free memory in bytes.
-Runtime.totalMemory() returns the total memory in bytes.
-Runtime.maxMemory() returns the maximum memory in bytes.
From using these methods, we know how much percent of the heap is used and how much heap space is outstanding.
-Runtime.freeMemory() return the amount of free memory in bytes.
-Runtime.totalMemory() returns the total memory in bytes.
-Runtime.maxMemory() returns the maximum memory in bytes.
No comments:
Post a Comment