Class Memory


  • public final class Memory
    extends Object
    A utility class for memory usage information.
    • Method Detail

      • getAllocatedMemory

        public static long getAllocatedMemory()
        Returns:
        the total memory allocated by this JVM in kilobytes
      • getFreeMemory

        public static long getFreeMemory()
        Returns:
        the free memory available to this JVM in kilobytes
      • getMaxMemory

        public static long getMaxMemory()
        Returns:
        the maximum memory available to this JVM in kilobytes
      • getUsedMemory

        public static long getUsedMemory()
        Returns:
        the memory used by this JVM in kilobytes
      • getMemoryUsageString

        public static String getMemoryUsageString()
        Returns:
        a String indicating the memory usage of this JVM