public class UnsafeDirectByteBuffer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static long |
addressOffset |
Constructor and Description |
---|
UnsafeDirectByteBuffer() |
Modifier and Type | Method and Description |
---|---|
static java.nio.ByteBuffer |
alignedSlice(int capacity,
long align,
java.nio.ByteBuffer buffy) |
static java.nio.ByteBuffer |
allocateAlignedByteBuffer(int capacity,
long align) |
static long |
getAddress(java.nio.ByteBuffer buffy) |
static boolean |
isAligned(long address,
long align) |
static boolean |
isCacheAligned(java.nio.ByteBuffer buffy)
This assumes cache line is 64b
|
static boolean |
isCacheAligned(long address)
This assumes cache line is 64b
|
static boolean |
isPageAligned(java.nio.ByteBuffer buffy) |
static boolean |
isPageAligned(long address) |
static void |
putByte(long address,
byte b) |
static void |
putByte(long address,
int position,
byte b)
put byte and skip position update and boundary checks
|
public static long getAddress(java.nio.ByteBuffer buffy)
public static void putByte(long address, int position, byte b)
buffy
- b
- public static void putByte(long address, byte b)
public static java.nio.ByteBuffer allocateAlignedByteBuffer(int capacity, long align)
public static java.nio.ByteBuffer alignedSlice(int capacity, long align, java.nio.ByteBuffer buffy)
public static boolean isPageAligned(java.nio.ByteBuffer buffy)
public static boolean isCacheAligned(java.nio.ByteBuffer buffy)
public static boolean isPageAligned(long address)
public static boolean isCacheAligned(long address)
public static boolean isAligned(long address, long align)