public class U extends Object
| 构造器和说明 |
|---|
U() |
| 限定符和类型 | 方法和说明 |
|---|---|
static long |
allocateMemory(long size)
Allocates a new block of native memory, of the given size in bytes.
|
static boolean |
compareAndSwapInt(Object o,
long offset,
int expect,
int value)
cas operation for int Field.
|
static boolean |
compareAndSwapLong(Object o,
long offset,
long expect,
long value)
cas operation for long Field.
|
static boolean |
compareAndSwapObject(Object o,
long offset,
Object expect,
Object value)
cas operation for Object Field.
|
static void |
freeMemory(long l)
Disposes of a block of native memory, as obtained from #allocateMemory or #reallocateMemory .
|
static byte |
getByte(long pos) |
static long |
objectFieldOffset(Class klass,
String field)
Get class field offset
|
static void |
read(long address,
byte[] src,
int offset,
int size)
read bytes from unsafe memory.
|
static long |
reallocateMemory(long address,
long size)
Resizes a new block of native memory, to the given size in bytes.
|
static void |
write(long address,
byte[] src,
int offset,
int size)
write bytes to unsafe memory.
|
public static long allocateMemory(long size)
public static long reallocateMemory(long address,
long size)
public static void freeMemory(long l)
public static void write(long address,
byte[] src,
int offset,
int size)
public static void read(long address,
byte[] src,
int offset,
int size)
public static long objectFieldOffset(Class klass, String field)
public static boolean compareAndSwapObject(Object o, long offset, Object expect, Object value)
public static boolean compareAndSwapLong(Object o, long offset, long expect, long value)
public static boolean compareAndSwapInt(Object o, long offset, int expect, int value)
public static byte getByte(long pos)
Copyright © 2014. All rights reserved.