Class Memory


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

      • allocatedMemory

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

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

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

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

        public static String memoryUsage()
        Returns:
        a String containing the memory usage of this JVM in kilobytes.