Package one.nio.mem
Class DirectMemory
- java.lang.Object
-
- one.nio.mem.DirectMemory
-
public final class DirectMemory extends Object
-
-
Constructor Summary
Constructors Constructor Description DirectMemory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longallocate(long size, Object holder)static longallocateAndClear(long size, Object holder)static longallocateDirty(long size)static longallocateRaw(long size)static voidclear(long address, long size)static voidclearSmall(long address, int size)static booleancompare(Object obj1, long offset1, Object obj2, long offset2, int count)static voidcopy(Object from, long fromOffset, Object to, long toOffset, int count)static voidfreeRaw(long address)static longgetAddress(ByteBuffer buffer)static ByteBufferwrap(long address, int count)
-
-
-
Method Detail
-
allocate
public static long allocate(long size, Object holder)
-
allocateAndClear
public static long allocateAndClear(long size, Object holder)
-
allocateDirty
public static long allocateDirty(long size)
-
allocateRaw
public static long allocateRaw(long size)
-
freeRaw
public static void freeRaw(long address)
-
clear
public static void clear(long address, long size)
-
clearSmall
public static void clearSmall(long address, int size)
-
getAddress
public static long getAddress(ByteBuffer buffer)
-
wrap
public static ByteBuffer wrap(long address, int count)
-
compare
public static boolean compare(Object obj1, long offset1, Object obj2, long offset2, int count)
-
-