Package org.ojalgo.machine
Class MemoryEstimator
- java.lang.Object
-
- org.ojalgo.machine.MemoryEstimator
-
public final class MemoryEstimator extends java.lang.Object
MemoryEstimator
-
-
Field Summary
Fields Modifier and Type Field Description private static long
FINAL_ALIGNEMENT
private long
myShallowSize
private static long
PARENT_ALIGNEMENT
private static long
WORD
private static long
ZERO
-
Constructor Summary
Constructors Modifier Constructor Description private
MemoryEstimator()
(package private)
MemoryEstimator(long aBase)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private MemoryEstimator
add(long bytes)
MemoryEstimator
add(java.lang.Class<?> type)
MemoryEstimator
add(JavaType type)
private long
align(long alignement)
long
estimate()
static long
estimateArray(java.lang.Class<?> componentType, int length)
static long
estimateObject(java.lang.Class<?> type)
(package private) static MemoryEstimator
make(java.lang.Class<?> type)
static MemoryEstimator
makeForClassExtendingObject()
static MemoryEstimator
makeForSubclass(MemoryEstimator parentEstimation)
-
-
-
Field Detail
-
FINAL_ALIGNEMENT
private static final long FINAL_ALIGNEMENT
- See Also:
- Constant Field Values
-
PARENT_ALIGNEMENT
private static final long PARENT_ALIGNEMENT
- See Also:
- Constant Field Values
-
WORD
private static final long WORD
- See Also:
- Constant Field Values
-
ZERO
private static final long ZERO
- See Also:
- Constant Field Values
-
myShallowSize
private long myShallowSize
-
-
Method Detail
-
estimateArray
public static long estimateArray(java.lang.Class<?> componentType, int length)
-
estimateObject
public static long estimateObject(java.lang.Class<?> type)
-
makeForClassExtendingObject
public static MemoryEstimator makeForClassExtendingObject()
-
makeForSubclass
public static MemoryEstimator makeForSubclass(MemoryEstimator parentEstimation)
-
make
static MemoryEstimator make(java.lang.Class<?> type)
-
add
public MemoryEstimator add(java.lang.Class<?> type)
-
add
public MemoryEstimator add(JavaType type)
-
estimate
public long estimate()
-
add
private MemoryEstimator add(long bytes)
-
align
private long align(long alignement)
-
-