Package monq.jfa.util
Class Sizeof
java.lang.Object
monq.jfa.util.Sizeof
estimator for the size of data structures. The sizes of individual elements used to compute the overall size of a data structure are estimates only derived on 1.4.2 on a 32bit Linux.
The implementation will be changed to
java.lang.instrument.Instrumentation as soon as we
switch to Java 5.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic intcharArrayMemEstimate(int numElems) static intobjectArrayMemEstimate(int numElems) static introundUp(int l)
-
Field Details
-
MEM_ARRAY_OVERHEAD
public static final int MEM_ARRAY_OVERHEAD- See Also:
-
MEM_PTR_SIZE
public static final int MEM_PTR_SIZE- See Also:
-
MEM_CHAR_INARRAY
public static final int MEM_CHAR_INARRAY- See Also:
-
MEM_OBJ_OVERHEAD
public static final int MEM_OBJ_OVERHEAD- See Also:
-
-
Method Details
-
charArrayMemEstimate
public static int charArrayMemEstimate(int numElems) -
objectArrayMemEstimate
public static int objectArrayMemEstimate(int numElems) -
roundUp
public static int roundUp(int l)
-