Klasse SystemMemory
java.lang.Object
ch.framedev.simplejavautils.SystemMemory
/ This Plugin was Created by FrameDev
/ Package : de.framedev.javautils
/ ClassName SystemMemory
/ Date: 16.07.21
/ Project: JavaUtils
/ Copyrighted by FrameDev
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunglongCurrent allocated free memory: space immediately ready for new objects.longTotal allocated memory: space currently reserved for the JVM heap within the process.Dump of the current state for debugging or understanding the memory divisions.longgetFree()Total free memory: memory available for new Objects, even at the cost of growing the allocated memory of the process.longgetTotal()Total designated memory: this will equal the configured-Xmxvalue.longUnallocated memory: amount of space the process' heap can grow.longgetUsed()Used memory: Java heap currently used by instantiated objects.booleanMaximum allocation: the process' allocated memory will not grow any further.booleanUnbounded memory: there is no inherent limit on free memory.
-
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-Xmxvalue.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
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.
-