Package ucar.nc2.dt.ugrid.utils
Class AsaMemoryUtils
- java.lang.Object
-
- ucar.nc2.dt.ugrid.utils.AsaMemoryUtils
-
public class AsaMemoryUtils extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAsaMemoryUtils.Converta static class used in converting between bytes, megabytes, and gigabytes
-
Constructor Summary
Constructors Constructor Description AsaMemoryUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublefreeMemoryAs(int sizeType)Returns the amount of free memory in the Java Virtual Machine in units denoted bysizeTypestatic doubletotalMemoryAs(int sizeType)Returns the total amount of memory in the Java Virtual Machine in units denoted bysizeType
-
-
-
Method Detail
-
freeMemoryAs
public static double freeMemoryAs(int sizeType)
Returns the amount of free memory in the Java Virtual Machine in units denoted bysizeType- Parameters:
sizeType- the type of units to report the JVM's free memory. Valid values are:com.asascience.utilities.Utils.Memory.BYTEcom.asascience.utilities.Utils.Memory.MEGABYTEcom.asascience.utilities.Utils.Memory.GIGABYTE
- Returns:
- the total amount of free memory in the Java Virtual Machine
TODO: if sizeType = 0, Double.NaN is returned
-
totalMemoryAs
public static double totalMemoryAs(int sizeType)
Returns the total amount of memory in the Java Virtual Machine in units denoted bysizeType- Parameters:
sizeType- the type of units to report the JVM's free memory. Valid values are:com.asascience.utilities.Utils.Memory.BYTEcom.asascience.utilities.Utils.Memory.MEGABYTEcom.asascience.utilities.Utils.Memory.GIGABYTE
- Returns:
- the total amount of memory in the Java Virtual Machine
TODO: if sizeType = 0, Double.NaN is returned
-
-