Klasse SystemMemory

java.lang.Object
ch.framedev.simplejavautils.SystemMemory

public class SystemMemory extends Object
/ This Plugin was Created by FrameDev / Package : de.framedev.javautils / ClassName SystemMemory / Date: 16.07.21 / Project: JavaUtils / Copyrighted by FrameDev
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    long
    Current allocated free memory: space immediately ready for new objects.
    long
    Total allocated memory: space currently reserved for the JVM heap within the process.
    Dump of the current state for debugging or understanding the memory divisions.
    long
    Total free memory: memory available for new Objects, even at the cost of growing the allocated memory of the process.
    long
    Total designated memory: this will equal the configured -Xmx value.
    long
    Unallocated memory: amount of space the process' heap can grow.
    long
    Used memory: Java heap currently used by instantiated objects.
    boolean
    Maximum allocation: the process' allocated memory will not grow any further.
    boolean
    Unbounded memory: there is no inherent limit on free memory.

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • SystemMemory

      public SystemMemory()
  • Methodendetails

    • getAllocatedTotal

      public long getAllocatedTotal()
      Total allocated memory: space currently reserved for the JVM heap within the process.

      Caution: this is not the total memory, the JVM may grow the heap for new allocations.

    • getAllocatedFree

      public long getAllocatedFree()
      Current allocated free memory: space immediately ready for new objects.

      Caution: this is not the total free available memory, the JVM may grow the heap for new allocations.

    • getUsed

      public long getUsed()
      Used memory: Java heap currently used by instantiated objects.

      Caution: May include no longer referenced objects, soft references, etc. that will be swept away by the next garbage collection.

    • isAtMaximumAllocation

      public boolean isAtMaximumAllocation()
      Maximum allocation: the process' allocated memory will not grow any further.

      Caution: This may change over time, do not cache it! There are some JVMs / garbage collectors that can shrink the allocated process memory.

      Caution: If this is true, the JVM will likely run GC more often.

    • getUnallocated

      public long getUnallocated()
      Unallocated memory: amount of space the process' heap can grow.
    • getTotal

      public long getTotal()
      Total designated memory: this will equal the configured -Xmx value.

      Caution: You can never allocate more memory than this, unless you use native code.

    • getFree

      public long getFree()
      Total free memory: memory available for new Objects, even at the cost of growing the allocated memory of the process.
    • isBounded

      public boolean isBounded()
      Unbounded memory: there is no inherent limit on free memory.
    • getCurrentStats

      public String getCurrentStats()
      Dump of the current state for debugging or understanding the memory divisions.

      Caution: Numbers may not match up exactly as state may change during the call.