public void free() {
   // Memory spys can veto the basic free if they determine the memory was
   // not allocated.
   if (memorySpy.free(this)) {
     osMemory.free(osaddr);
   }
 }
 /**
  * Sending auto free to an address means that, when this subsystem has allocated the memory, it
  * will automatically be freed when this object is collected by the garbage collector if the
  * memory has not already been freed explicitly.
  */
 public final void autoFree() {
   memorySpy.autoFree(this);
 }
 public final void setDouble(int offset, double value) {
   memorySpy.rangeCheck(this, offset, SIZEOF_JDOUBLE);
   osMemory.setDouble(osaddr + offset, value);
 }
 public final double getDouble(int offset) {
   memorySpy.rangeCheck(this, offset, SIZEOF_JDOUBLE);
   return osMemory.getDouble(osaddr + offset);
 }
 public final void setFloat(int offset, float value) {
   memorySpy.rangeCheck(this, offset, SIZEOF_JFLOAT);
   osMemory.setFloat(osaddr + offset, value);
 }
 public final float getFloat(int offset) {
   memorySpy.rangeCheck(this, offset, SIZEOF_JFLOAT);
   return osMemory.getFloat(osaddr + offset);
 }
 public final void setLong(int offset, long value) {
   memorySpy.rangeCheck(this, offset, SIZEOF_JLONG);
   osMemory.setLong(osaddr + offset, value);
 }
 public final void setIntArray(int offset, int[] ints, int intsOffset, int length, boolean swap) {
   memorySpy.rangeCheck(this, offset, length * SIZEOF_JINT);
   osMemory.setIntArray(osaddr + offset, ints, intsOffset, length, swap);
 }
 public final void setInt(int offset, int value) {
   memorySpy.rangeCheck(this, offset, SIZEOF_JINT);
   osMemory.setInt(osaddr + offset, value);
 }
示例#10
0
 public final int getInt(int offset) {
   memorySpy.rangeCheck(this, offset, SIZEOF_JINT);
   return osMemory.getInt(osaddr + offset);
 }
示例#11
0
 public final short getShort(int offset) {
   memorySpy.rangeCheck(this, offset, SIZEOF_JSHORT);
   return osMemory.getShort(osaddr + offset);
 }
示例#12
0
 public final void setShort(int offset, short value) {
   memorySpy.rangeCheck(this, offset, SIZEOF_JSHORT);
   osMemory.setShort(osaddr + offset, value);
 }
示例#13
0
 public final byte getByte(int offset) {
   memorySpy.rangeCheck(this, offset, SIZEOF_JBYTE);
   return osMemory.getByte(osaddr + offset);
 }
示例#14
0
 public final void setByte(int offset, byte value) {
   memorySpy.rangeCheck(this, offset, SIZEOF_JBYTE);
   osMemory.setByte(osaddr + offset, value);
 }
示例#15
0
 public final long getLong(int offset) {
   memorySpy.rangeCheck(this, offset, SIZEOF_JLONG);
   return osMemory.getLong(osaddr + offset);
 }
示例#16
0
 public final void setByteArray(int offset, byte[] bytes, int bytesOffset, int length) {
   memorySpy.rangeCheck(this, offset, length * SIZEOF_JBYTE);
   osMemory.setByteArray(osaddr + offset, bytes, bytesOffset, length);
 }
示例#17
0
 // BEGIN android-added
 public final void setShortArray(
     int offset, short[] shorts, int shortsOffset, int length, boolean swap) {
   memorySpy.rangeCheck(this, offset, length * SIZEOF_JSHORT);
   osMemory.setShortArray(osaddr + offset, shorts, shortsOffset, length, swap);
 }