Package org.apache.sysds.utils
Class MemoryEstimates
- java.lang.Object
- 
- org.apache.sysds.utils.MemoryEstimates
 
- 
 public class MemoryEstimates extends Object Memory Estimates is a helper class containing static classes that estimate the memory requirements of different types of objects in java. All estimates are worst case JVM x86-64bit uncompressed object pointers. This in practice means that the objects are most commonly smaller, for instance the object references are often time. If the memory pressure is low (there is a low number of allocated objects) then object pointers are 4 bits.
- 
- 
Constructor SummaryConstructors Constructor Description MemoryEstimates()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static longbitSetCost(int length)Get the worst case memory usage of an java.util.BitSet java object.static longbyteArrayCost(int length)Get the worst case memory usage of an array of bytes.static longcharArrayCost(int length)Get the worst case memory usage of an array of chars.static doubledoubleArrayCost(long length)Get the worst case memory usage of an array of doubles.static doubleintArrayCost(long length)Get the worst case memory usage of an array of integers.static doublelongArrayCost(int length)Get the worst case memory usage for an array of longsstatic doubleobjectArrayCost(long length)Get the worst case memory usage for an array of objects.
 
- 
- 
- 
Method Detail- 
bitSetCostpublic static long bitSetCost(int length) Get the worst case memory usage of an java.util.BitSet java object.- Parameters:
- length- The length of the array.
- Returns:
- The memory estimate in bytes
 
 - 
byteArrayCostpublic static long byteArrayCost(int length) Get the worst case memory usage of an array of bytes.- Parameters:
- length- The length of the array.
- Returns:
- The memory estimate in bytes
 
 - 
charArrayCostpublic static long charArrayCost(int length) Get the worst case memory usage of an array of chars.- Parameters:
- length- The length of the array.
- Returns:
- The memory estimate in bytes
 
 - 
intArrayCostpublic static double intArrayCost(long length) Get the worst case memory usage of an array of integers.- Parameters:
- length- The length of the array.
- Returns:
- The memory estimate in bytes
 
 - 
doubleArrayCostpublic static double doubleArrayCost(long length) Get the worst case memory usage of an array of doubles.- Parameters:
- length- The length of the array.
- Returns:
- The memory estimate in bytes
 
 - 
objectArrayCostpublic static double objectArrayCost(long length) Get the worst case memory usage for an array of objects.- Parameters:
- length- The length of the array.
- Returns:
- The memory estimate in bytes
 
 - 
longArrayCostpublic static double longArrayCost(int length) Get the worst case memory usage for an array of longs- Parameters:
- length- The length of the array.
- Returns:
- The memory estimate in bytes
 
 
- 
 
-