RuedigerMoeller / fast-serialization

FST: fast java serialization drop in-replacement
Apache License 2.0
1.59k stars 245 forks source link

MallocBytez is using Unsafe class that is not supported in android #153

Open FabianTerhorst opened 8 years ago

FabianTerhorst commented 8 years ago

The MallocBytez class is using Unsafe class which is not supported in android. Im getting following error when i use FSTSerializedOffheapMap in android.

No virtual method copyMemory(Ljava/lang/Object;JLjava/lang/Object;JJ)V in class Lsun/misc/Unsafe; or its super classes (declaration of 'sun.misc.Unsafe' appears in /system/framework/core-oj.jar)
                                                       at org.nustaq.offheap.bytez.malloc.MallocBytez.getArr(MallocBytez.java:149)
FabianTerhorst commented 8 years ago

You fixed this in java/org/nustaq/serialization/FSTClazzInfo.java#L720 already.

RuedigerMoeller commented 8 years ago

the offheap stuff was never meant to be used on android. will have a look into it. Thanks for report