|
2010 FRC Java API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.squawk.NativeUnsafe
public final class NativeUnsafe
A collection of methods for performing peek and poke operations on memory addresses.
Only the public methods of this class which do not override any of the
methods in java.lang.Object will be available in a non-hosted
environment. The translator replaces any calls to these methods to native
method calls.
Field Summary | |
---|---|
static int |
NATIVE_TASK_ARGS_OFFSET
|
static int |
NATIVE_TASK_EVENTID_OFFSET
|
static int |
NATIVE_TASK_LOW_RESULT_OFFSET
|
static int |
NATIVE_TASK_NT_ERRNO_RESULT_OFFSET
|
static int |
NATIVE_TASK_RESULT_OFFSET
|
Method Summary | |
---|---|
static void |
clearObject(Object base,
int offset)
Clears a pointer value in memory. |
static void |
copyMemory(byte[] buffer,
int memoryOffset,
int bufferOffset,
int length)
Copies a range of memory into a buffer. |
static int |
getNativeTaskErrno(Address ntask)
|
static int |
getNativeTaskEventID(Address ntask)
|
static int |
getNativeTaskResult(Address ntask)
|
static int |
getUByte(Object base,
int offset)
|
static void |
hostedInit()
Do this little dance to avoid initializing static variables only used in a hosted environment. |
static void |
initialize(byte[] buffer,
BitSet oopMap,
boolean append)
Initialize or appends to the contents of memory. |
static void |
setMemorySize(int newSize)
Sets the size of used/initialized memory. |
static int |
waitForBlockingFunction(Address ntask)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NATIVE_TASK_ARGS_OFFSET
public static final int NATIVE_TASK_EVENTID_OFFSET
public static final int NATIVE_TASK_LOW_RESULT_OFFSET
public static final int NATIVE_TASK_NT_ERRNO_RESULT_OFFSET
public static final int NATIVE_TASK_RESULT_OFFSET
Method Detail |
---|
public static void clearObject(Object base, int offset)
base
- the base addressoffset
- the offset (in UWords) from base
of the pointer to clearpublic static void copyMemory(byte[] buffer, int memoryOffset, int bufferOffset, int length)
buffer
- the buffer to copy intomemoryOffset
- the offset in memory at which to start copying frombufferOffset
- the offset in buffer
at which to start copying tolength
- the number of bytes to copypublic static int getNativeTaskErrno(Address ntask)
public static int getNativeTaskEventID(Address ntask)
public static int getNativeTaskResult(Address ntask)
public static int getUByte(Object base, int offset)
Unsafe.getUByte(com.sun.squawk.Address, int)
public static void hostedInit()
public static void initialize(byte[] buffer, BitSet oopMap, boolean append)
buffer
- a buffer containing a serialized object memory relative to 0oopMap
- an oop map specifying where the pointers in the serialized object memory areappend
- specifies if the memory is being appended topublic static void setMemorySize(int newSize)
newSize
and greater are zeroed.
newSize
- the new size of memorypublic static int waitForBlockingFunction(Address ntask)
|
2010 FRC Java API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |