J.Memory
J.Memory provides nicer access to 'java.lang.Runtime.getRuntime' memory values
```
J.Vm.Memory.tp
// Oputput
J.Vm.Memory{max=15.2gB,total=1.0gB,free=970.0mB,used=59.1mB}
```
- Source
- Memory.scala
Def
Free
Free
Returns the amount of free memory in the Java Virtual Machine
Calling the 'gc' method may result in increasing the value returned by free
This is a shortcut to Java 'Runtime.getRuntime.freeMemory'
- Source
- Memory.scala
Garbage collect
Garbage collect
Runs the garbage collector
Calling this method suggests that the Java virtual machine expend effort toward recycling unused objects in order to make the memory they currently occupy available for quick reuse
When control returns from the method call, the virtual machine has made its best effort to recycle all discarded objects.
The name gc stands for "garbage collector"
The virtual machine performs this recycling process automatically as needed, in a separate thread, even if the 'gc' method is not invoked explicitly
- Source
- Memory.scala
Maximum
Maximum
Returns the maximum amount of memory that the Java virtual machine will attempt to use
This is a shortcut to Java 'Runtime.getRuntime.maxMemory'
- Source
- Memory.scala
Total
Total
Returns the total amount of memory in the Java virtual machine
This is a shortcut to Java 'Runtime.getRuntime.totalMemory'
- Source
- Memory.scala
Used
Used
Returns (total - free)
This is a shortcut to Java 'Runtime.getRuntime.totalMemory - Runtime.getRuntime.freeMemory'
- Source
- Memory.scala