CarBench.Car.class, CarBench.Engine.class, CarBench.Model.class,
CarBench.Accel.class, CarBench.PerformanceFigures.class,
CarBench.FueldData.class, CarBench.OptionalExtras.class);
// OffHeapCoder coder = new OffHeapCoder();
MallocBytezAllocator alloc = new MallocBytezAllocator();
MallocBytez bytez = (MallocBytez) alloc.alloc(1000 * 1000);
ohbench(original, coder, bytez);
ohbench(original, coder, bytez);
ohbench(original, coder, bytez);
ohbench(original, coder, bytez);
Object deser = ohbench(original, coder, bytez);
assertTrue(DeepEquals.deepEquals(original, deser));
System.out.println("-----");
ohbench(smallClazz, coder, bytez);
ohbench(smallClazz, coder, bytez);
ohbench(smallClazz, coder, bytez);
ohbench(smallClazz, coder, bytez);
deser = ohbench(smallClazz, coder, bytez);
assertTrue(DeepEquals.deepEquals(smallClazz, deser));
boolean lenEx = false;
try {
coder.toMemory(original, bytez.getBaseAdress(), 10);
} catch (Exception e) {
lenEx = true;
}
Assert.assertTrue(lenEx);
alloc.freeAll();
}