Methods Summary |
---|
public void | flush(int addr, long size)TODO : JavaDoc
|
public void | free(int address)Deallocates space for a memory block that was previously allocated by a
call to {@link #malloc(int) malloc(long)}. The number of bytes freed is
identical to the number of bytes acquired when the memory block was
allocated. If address is zero the method does nothing.
Freeing a pointer to a memory block that was not allocated by
malloc() has unspecified effect.
|
public int | getAddress(int address)Gets the value of the platform pointer at the given address.
The length of the platform pointer is defined by
POINTER_SIZE .
The behavior is unspecified if
(address ... address + POINTER_SIZE) is not wholly within
the range that was previously allocated using malloc() .
|
public byte | getByte(int address)
|
public void | getByteArray(int address, byte[] bytes, int offset, int length)Copies length bytes from the memory block at
address into the byte array bytes starting
at element offset within the byte array.
The behavior of this method is undefined if the range
(address ... address + length) is not within a memory
block that was allocated using {@link #malloc(int) malloc(long)}.
|
public double | getDouble(int address)Gets the value of the IEEE754-format eight-byte float stored in platform
byte order at the given address.
The behavior is unspecified if (address ... address + 8)
is not wholly within the range that was previously allocated using
malloc() .
|
public double | getDouble(int address, Endianness endianness)
|
public float | getFloat(int address)Gets the value of the IEEE754-format four-byte float stored in platform
byte order at the given address.
The behavior is unspecified if (address ... address + 4)
is not wholly within the range that was previously allocated using
malloc() .
|
public float | getFloat(int address, Endianness endianness)
|
public int | getInt(int address)Gets the value of the signed four-byte integer stored in platform
byte-order at the given address.
The behavior is unspecified if (address ... address + 4)
is not wholly within the range that was previously allocated using
malloc() .
|
public int | getInt(int address, Endianness endianness)
|
public long | getLong(int address)Gets the value of the signed eight-byte integer stored in platform byte
order at the given address.
The behavior is unspecified if (address ... address + 8)
is not wholly within the range that was previously allocated using
malloc() .
|
public long | getLong(int address, Endianness endianness)
|
public int | getPointerSize()Returns the platform pointer size.
|
public short | getShort(int address)Gets the value of the signed two-byte integer stored in platform byte
order at the given address.
The behavior is unspecified if (address ... address + 2)
is not wholly within the range that was previously allocated using
malloc() .
|
public short | getShort(int address, Endianness endianness)
|
public boolean | isLittleEndian()Returns true if the platform is little endian, otherwise it may be
assumed to be big endian..
|
public boolean | isLoaded(int addr, long size)TODO: JavaDoc
|
public void | load(int addr, long size)TODO: JavaDoc
|
public int | malloc(int length)Allocates and returns a pointer to space for a memory block of
length bytes. The space is uninitialized and may be larger
than the number of bytes requested; however, the guaranteed usable memory
block is exactly length bytes long.
|
public void | memmove(int destAddress, int srcAddress, long length)Copies length bytes from srcAddress to
destAddress . Where any part of the source memory block
and the destination memory block overlap memmove() ensures
that the original source bytes in the overlapping region are copied
before being overwritten.
The behavior is unspecified if
(srcAddress ... srcAddress + length) and
(destAddress ... destAddress + length) are not both wholly
within the range that was previously allocated using
malloc() .
|
public void | memset(int address, byte value, long length)Places value into first length bytes of the
memory block starting at address .
The behavior is unspecified if
(address ... address + length) is not wholly within the
range that was previously allocated using malloc() .
|
public int | mmap(int fileDescriptor, long alignment, long size, int mapMode)TODO: JavaDoc
|
public void | setAddress(int address, int value)Sets the value of the platform pointer at the given address.
The length of the platform pointer is defined by
POINTER_SIZE . This method only sets
POINTER_SIZE bytes at the given address.
The behavior is unspecified if
(address ... address + POINTER_SIZE) is not wholly within
the range that was previously allocated using malloc() .
|
public void | setByte(int address, byte value)Sets the given single byte value at the given address.
The behavior is unspecified if address is not in the range
that was previously allocated using malloc() .
|
public void | setByteArray(int address, byte[] bytes, int offset, int length)Copies length bytes from the byte array bytes
into the memory block at address , starting at element
offset within the byte array.
The behavior of this method is undefined if the range
(address ... address + length) is not within a memory
block that was allocated using {@link #malloc(int) malloc(long)}.
|
public void | setDouble(int address, double value)Sets the value of the IEEE754-format eight-byte float store in platform
byte order at the given address.
The behavior is unspecified if (address ... address + 8)
is not wholly within the range that was previously allocated using
malloc() .
|
public void | setDouble(int address, double value, Endianness endianness)
|
public void | setFloat(int address, float value)Sets the value of the IEEE754-format four-byte float stored in platform
byte order at the given address.
The behavior is unspecified if (address ... address + 4)
is not wholly within the range that was previously allocated using
malloc() .
|
public void | setFloat(int address, float value, Endianness endianness)
|
public void | setInt(int address, int value)Sets the value of the signed four-byte integer at the given address in
platform byte order.
The behavior is unspecified if (address ... address + 4)
is not wholly within the range that was previously allocated using
malloc() .
|
public void | setInt(int address, int value, Endianness endianness)
|
public void | setIntArray(int address, int[] ints, int offset, int length, boolean swap)Copies length ints from the int array ints
into the memory block at address , starting at element
offset within the int array.
The behavior of this method is undefined if the range
(address ... address + length*4) is not within a memory
block that was allocated using {@link #malloc(int) malloc(long)}.
|
public void | setLong(int address, long value)Sets the value of the signed eight-byte integer at the given address in
the platform byte order.
The behavior is unspecified if (address ... address + 8)
is not wholly within the range that was previously allocated using
malloc() .
|
public void | setLong(int address, long value, Endianness endianness)
|
public void | setShort(int address, short value)Sets the value of the signed two-byte integer at the given address in
platform byte order.
The behavior is unspecified if (address ... address + 2)
is not wholly within the range that was previously allocated using
malloc() .
|
public void | setShort(int address, short value, Endianness endianness)
|
public void | setShortArray(int address, short[] shorts, int offset, int length, boolean swap)Copies length shorts from the short array short
into the memory block at address , starting at element
offset within the short array.
The behavior of this method is undefined if the range
(address ... address + length*2) is not within a memory
block that was allocated using {@link #malloc(int) malloc(long)}.
|
public void | unmap(int addr, long size)TODO: JavaDoc
|