Package org.h2.test.utils
Class MemoryFootprint
- java.lang.Object
-
- org.h2.test.utils.MemoryFootprint
-
public class MemoryFootprint extends java.lang.ObjectCalculate the memory footprint of various objects.
-
-
Constructor Summary
Constructors Constructor Description MemoryFootprint()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longgetObjectSize(java.lang.Object o)Get the number of bytes required for the given object.static voidmain(java.lang.String... a)Run just this test.
-
-
-
Method Detail
-
main
public static void main(java.lang.String... a)
Run just this test.- Parameters:
a- ignored
-
getObjectSize
public static long getObjectSize(java.lang.Object o)
Get the number of bytes required for the given object. This method only works if the agent is set.- Parameters:
o- the object- Returns:
- the number of bytes required
-
-