diff options
author | Elliott Hughes <enh@google.com> | 2013-03-29 17:14:54 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-03-29 17:14:54 +0000 |
commit | 589d6f45d4c38c1d74ea970284c32ed013422eef (patch) | |
tree | 1ba20ebf542080dc56b1ce448b93e89e6b1e6c59 | |
parent | 6ebe24c3dccddf8d00e50f587364797ee21eb4dd (diff) | |
parent | 0121106d9dc1ba713b53822886355e4d9339e852 (diff) |
Merge "Use longs instead of ints to store pointers in NIO buffers."
-rw-r--r-- | luni/src/main/java/java/nio/Buffer.java | 2 | ||||
-rw-r--r-- | luni/src/main/java/java/nio/DirectByteBuffer.java | 2 | ||||
-rw-r--r-- | luni/src/main/java/java/nio/MappedByteBuffer.java | 15 | ||||
-rw-r--r-- | luni/src/main/java/java/nio/MemoryBlock.java | 19 | ||||
-rw-r--r-- | luni/src/main/java/java/nio/NIOAccess.java | 2 | ||||
-rw-r--r-- | luni/src/main/java/libcore/io/Memory.java | 50 | ||||
-rw-r--r-- | luni/src/main/java/libcore/io/MemoryMappedFile.java | 4 | ||||
-rw-r--r-- | luni/src/main/java/libcore/io/NioBufferIterator.java | 4 | ||||
-rw-r--r-- | luni/src/main/native/libcore_io_Memory.cpp | 92 |
9 files changed, 94 insertions, 96 deletions
diff --git a/luni/src/main/java/java/nio/Buffer.java b/luni/src/main/java/java/nio/Buffer.java index 3ba2503f05..9b7be52d59 100644 --- a/luni/src/main/java/java/nio/Buffer.java +++ b/luni/src/main/java/java/nio/Buffer.java @@ -87,7 +87,7 @@ public abstract class Buffer { * This is set in the constructor. * TODO: make this final at the cost of loads of extra constructors? [how many?] */ - int effectiveDirectAddress; + long effectiveDirectAddress; /** * For direct buffers, the underlying MemoryBlock; null otherwise. diff --git a/luni/src/main/java/java/nio/DirectByteBuffer.java b/luni/src/main/java/java/nio/DirectByteBuffer.java index b624a41f52..43db9e073d 100644 --- a/luni/src/main/java/java/nio/DirectByteBuffer.java +++ b/luni/src/main/java/java/nio/DirectByteBuffer.java @@ -37,7 +37,7 @@ class DirectByteBuffer extends MappedByteBuffer { throw new IllegalArgumentException("capacity + offset > baseSize"); } - this.effectiveDirectAddress = block.toInt() + offset; + this.effectiveDirectAddress = block.toLong() + offset; this.offset = offset; this.isReadOnly = isReadOnly; diff --git a/luni/src/main/java/java/nio/MappedByteBuffer.java b/luni/src/main/java/java/nio/MappedByteBuffer.java index 2ba92588b9..2d44d0f365 100644 --- a/luni/src/main/java/java/nio/MappedByteBuffer.java +++ b/luni/src/main/java/java/nio/MappedByteBuffer.java @@ -52,7 +52,7 @@ public abstract class MappedByteBuffer extends ByteBuffer { public final boolean isLoaded() { checkIsMapped(); - long address = block.toInt(); + long address = block.toLong(); long size = block.getSize(); if (size == 0) { return true; @@ -85,18 +85,17 @@ public abstract class MappedByteBuffer extends ByteBuffer { checkIsMapped(); try { - Libcore.os.mlock(block.toInt(), block.getSize()); - Libcore.os.munlock(block.toInt(), block.getSize()); + Libcore.os.mlock(block.toLong(), block.getSize()); + Libcore.os.munlock(block.toLong(), block.getSize()); } catch (ErrnoException ignored) { } return this; } /** - * Writes all changes of the buffer to the mapped file. If the mapped file - * is stored on a local device, it is guaranteed that the changes are - * written to the file. No such guarantee is given if the file is located on - * a remote device. + * Flushes changes made to the in-memory buffer back to the mapped file. + * Unless you call this, changes may not be written back until the finalizer + * runs. This method waits for the write to complete before returning. * * @return this buffer. */ @@ -105,7 +104,7 @@ public abstract class MappedByteBuffer extends ByteBuffer { if (mapMode == MapMode.READ_WRITE) { try { - Libcore.os.msync(block.toInt(), block.getSize(), MS_SYNC); + Libcore.os.msync(block.toLong(), block.getSize(), MS_SYNC); } catch (ErrnoException errnoException) { // The RI doesn't throw, presumably on the assumption that you can't get into // a state where msync(2) could return an error. diff --git a/luni/src/main/java/java/nio/MemoryBlock.java b/luni/src/main/java/java/nio/MemoryBlock.java index add69c5457..718b020ee4 100644 --- a/luni/src/main/java/java/nio/MemoryBlock.java +++ b/luni/src/main/java/java/nio/MemoryBlock.java @@ -31,7 +31,7 @@ class MemoryBlock { * Handles calling munmap(2) on a memory-mapped region. */ private static class MemoryMappedBlock extends MemoryBlock { - private MemoryMappedBlock(int address, long byteCount) { + private MemoryMappedBlock(long address, long byteCount) { super(address, byteCount); } @@ -63,7 +63,7 @@ class MemoryBlock { private static class NonMovableHeapBlock extends MemoryBlock { private byte[] array; - private NonMovableHeapBlock(byte[] array, int address, long byteCount) { + private NonMovableHeapBlock(byte[] array, long address, long byteCount) { super(address, byteCount); this.array = array; } @@ -83,13 +83,12 @@ class MemoryBlock { * to direct buffers created by the JNI NewDirectByteBuffer function.) */ private static class UnmanagedBlock extends MemoryBlock { - private UnmanagedBlock(int address, long byteCount) { + private UnmanagedBlock(long address, long byteCount) { super(address, byteCount); } } - // TODO: should be long on 64-bit devices; int for performance. - protected int address; + protected long address; protected final long size; public static MemoryBlock mmap(FileDescriptor fd, long offset, long size, MapMode mapMode) throws IOException { @@ -114,7 +113,7 @@ class MemoryBlock { flags = MAP_SHARED; } try { - int address = (int) Libcore.os.mmap(0L, size, prot, flags, fd, offset); + long address = Libcore.os.mmap(0L, size, prot, flags, fd, offset); return new MemoryMappedBlock(address, size); } catch (ErrnoException errnoException) { throw errnoException.rethrowAsIOException(); @@ -124,15 +123,15 @@ class MemoryBlock { public static MemoryBlock allocate(int byteCount) { VMRuntime runtime = VMRuntime.getRuntime(); byte[] array = (byte[]) runtime.newNonMovableArray(byte.class, byteCount); - int address = (int) runtime.addressOf(array); + long address = runtime.addressOf(array); return new NonMovableHeapBlock(array, address, byteCount); } - public static MemoryBlock wrapFromJni(int address, long byteCount) { + public static MemoryBlock wrapFromJni(long address, long byteCount) { return new UnmanagedBlock(address, byteCount); } - private MemoryBlock(int address, long size) { + private MemoryBlock(long address, long size) { this.address = address; this.size = size; } @@ -233,7 +232,7 @@ class MemoryBlock { return Memory.peekLong(address + offset, order.needsSwap); } - public final int toInt() { + public final long toLong() { return address; } diff --git a/luni/src/main/java/java/nio/NIOAccess.java b/luni/src/main/java/java/nio/NIOAccess.java index 36c41cf26c..12af44d318 100644 --- a/luni/src/main/java/java/nio/NIOAccess.java +++ b/luni/src/main/java/java/nio/NIOAccess.java @@ -33,7 +33,7 @@ final class NIOAccess { * position, or 0 if there is none */ static long getBasePointer(Buffer b) { - int address = b.effectiveDirectAddress; + long address = b.effectiveDirectAddress; if (address == 0) { return 0L; } diff --git a/luni/src/main/java/libcore/io/Memory.java b/luni/src/main/java/libcore/io/Memory.java index 9bf1acb6d8..5743949f8a 100644 --- a/luni/src/main/java/libcore/io/Memory.java +++ b/luni/src/main/java/libcore/io/Memory.java @@ -150,29 +150,29 @@ public final class Memory { */ public static native void memmove(Object dstObject, int dstOffset, Object srcObject, int srcOffset, long byteCount); - public static native byte peekByte(int address); - public static native int peekInt(int address, boolean swap); - public static native long peekLong(int address, boolean swap); - public static native short peekShort(int address, boolean swap); - - public static native void peekByteArray(int address, byte[] dst, int dstOffset, int byteCount); - public static native void peekCharArray(int address, char[] dst, int dstOffset, int charCount, boolean swap); - public static native void peekDoubleArray(int address, double[] dst, int dstOffset, int doubleCount, boolean swap); - public static native void peekFloatArray(int address, float[] dst, int dstOffset, int floatCount, boolean swap); - public static native void peekIntArray(int address, int[] dst, int dstOffset, int intCount, boolean swap); - public static native void peekLongArray(int address, long[] dst, int dstOffset, int longCount, boolean swap); - public static native void peekShortArray(int address, short[] dst, int dstOffset, int shortCount, boolean swap); - - public static native void pokeByte(int address, byte value); - public static native void pokeInt(int address, int value, boolean swap); - public static native void pokeLong(int address, long value, boolean swap); - public static native void pokeShort(int address, short value, boolean swap); - - public static native void pokeByteArray(int address, byte[] src, int offset, int count); - public static native void pokeCharArray(int address, char[] src, int offset, int count, boolean swap); - public static native void pokeDoubleArray(int address, double[] src, int offset, int count, boolean swap); - public static native void pokeFloatArray(int address, float[] src, int offset, int count, boolean swap); - public static native void pokeIntArray(int address, int[] src, int offset, int count, boolean swap); - public static native void pokeLongArray(int address, long[] src, int offset, int count, boolean swap); - public static native void pokeShortArray(int address, short[] src, int offset, int count, boolean swap); + public static native byte peekByte(long address); + public static native int peekInt(long address, boolean swap); + public static native long peekLong(long address, boolean swap); + public static native short peekShort(long address, boolean swap); + + public static native void peekByteArray(long address, byte[] dst, int dstOffset, int byteCount); + public static native void peekCharArray(long address, char[] dst, int dstOffset, int charCount, boolean swap); + public static native void peekDoubleArray(long address, double[] dst, int dstOffset, int doubleCount, boolean swap); + public static native void peekFloatArray(long address, float[] dst, int dstOffset, int floatCount, boolean swap); + public static native void peekIntArray(long address, int[] dst, int dstOffset, int intCount, boolean swap); + public static native void peekLongArray(long address, long[] dst, int dstOffset, int longCount, boolean swap); + public static native void peekShortArray(long address, short[] dst, int dstOffset, int shortCount, boolean swap); + + public static native void pokeByte(long address, byte value); + public static native void pokeInt(long address, int value, boolean swap); + public static native void pokeLong(long address, long value, boolean swap); + public static native void pokeShort(long address, short value, boolean swap); + + public static native void pokeByteArray(long address, byte[] src, int offset, int count); + public static native void pokeCharArray(long address, char[] src, int offset, int count, boolean swap); + public static native void pokeDoubleArray(long address, double[] src, int offset, int count, boolean swap); + public static native void pokeFloatArray(long address, float[] src, int offset, int count, boolean swap); + public static native void pokeIntArray(long address, int[] src, int offset, int count, boolean swap); + public static native void pokeLongArray(long address, long[] src, int offset, int count, boolean swap); + public static native void pokeShortArray(long address, short[] src, int offset, int count, boolean swap); } diff --git a/luni/src/main/java/libcore/io/MemoryMappedFile.java b/luni/src/main/java/libcore/io/MemoryMappedFile.java index 1c106dedba..2d8aa2b4d7 100644 --- a/luni/src/main/java/libcore/io/MemoryMappedFile.java +++ b/luni/src/main/java/libcore/io/MemoryMappedFile.java @@ -74,14 +74,14 @@ public final class MemoryMappedFile implements AutoCloseable { * Returns a new iterator that treats the mapped data as big-endian. */ public BufferIterator bigEndianIterator() { - return new NioBufferIterator((int) address, (int) size, ByteOrder.nativeOrder() != ByteOrder.BIG_ENDIAN); + return new NioBufferIterator(address, (int) size, ByteOrder.nativeOrder() != ByteOrder.BIG_ENDIAN); } /** * Returns a new iterator that treats the mapped data as little-endian. */ public BufferIterator littleEndianIterator() { - return new NioBufferIterator((int) address, (int) size, ByteOrder.nativeOrder() != ByteOrder.LITTLE_ENDIAN); + return new NioBufferIterator(address, (int) size, ByteOrder.nativeOrder() != ByteOrder.LITTLE_ENDIAN); } /** diff --git a/luni/src/main/java/libcore/io/NioBufferIterator.java b/luni/src/main/java/libcore/io/NioBufferIterator.java index ae29e5953e..3dd05a5a54 100644 --- a/luni/src/main/java/libcore/io/NioBufferIterator.java +++ b/luni/src/main/java/libcore/io/NioBufferIterator.java @@ -25,13 +25,13 @@ import libcore.io.Memory; * @hide don't make this public without adding bounds checking. */ public final class NioBufferIterator extends BufferIterator { - private final int address; + private final long address; private final int size; private final boolean swap; private int position; - NioBufferIterator(int address, int size, boolean swap) { + NioBufferIterator(long address, int size, boolean swap) { this.address = address; this.size = size; this.swap = swap; diff --git a/luni/src/main/native/libcore_io_Memory.cpp b/luni/src/main/native/libcore_io_Memory.cpp index e1ca57186e..77aef5bd98 100644 --- a/luni/src/main/native/libcore_io_Memory.cpp +++ b/luni/src/main/native/libcore_io_Memory.cpp @@ -38,7 +38,7 @@ #define LONG_ALIGNMENT_MASK 0x7 #define INT_ALIGNMENT_MASK 0x3 #define SHORT_ALIGNMENT_MASK 0x1 -#elif defined(__i386__) +#elif defined(__i386__) || defined(__x86_64__) // x86 can load anything at any alignment. #define LONG_ALIGNMENT_MASK 0x0 #define INT_ALIGNMENT_MASK 0x0 @@ -62,7 +62,7 @@ template <typename T> static inline void put_unaligned(T* address, T v) { p->v = v; } -template <typename T> static T cast(jint address) { +template <typename T> static T cast(jlong address) { return reinterpret_cast<T>(static_cast<uintptr_t>(address)); } @@ -154,11 +154,11 @@ static void Memory_memmove(JNIEnv* env, jclass, jobject dstObject, jint dstOffse memmove(dstBytes.get() + dstOffset, srcBytes.get() + srcOffset, length); } -static jbyte Memory_peekByte(JNIEnv*, jclass, jint srcAddress) { +static jbyte Memory_peekByte(JNIEnv*, jclass, jlong srcAddress) { return *cast<const jbyte*>(srcAddress); } -static void Memory_peekByteArray(JNIEnv* env, jclass, jint srcAddress, jbyteArray dst, jint dstOffset, jint byteCount) { +static void Memory_peekByteArray(JNIEnv* env, jclass, jlong srcAddress, jbyteArray dst, jint dstOffset, jint byteCount) { env->SetByteArrayRegion(dst, dstOffset, byteCount, cast<const jbyte*>(srcAddress)); } @@ -183,35 +183,35 @@ static void Memory_peekByteArray(JNIEnv* env, jclass, jint srcAddress, jbyteArra } \ } -static void Memory_peekCharArray(JNIEnv* env, jclass, jint srcAddress, jcharArray dst, jint dstOffset, jint count, jboolean swap) { +static void Memory_peekCharArray(JNIEnv* env, jclass, jlong srcAddress, jcharArray dst, jint dstOffset, jint count, jboolean swap) { PEEKER(jchar, Char, jshort, swapShorts); } -static void Memory_peekDoubleArray(JNIEnv* env, jclass, jint srcAddress, jdoubleArray dst, jint dstOffset, jint count, jboolean swap) { +static void Memory_peekDoubleArray(JNIEnv* env, jclass, jlong srcAddress, jdoubleArray dst, jint dstOffset, jint count, jboolean swap) { PEEKER(jdouble, Double, jlong, swapLongs); } -static void Memory_peekFloatArray(JNIEnv* env, jclass, jint srcAddress, jfloatArray dst, jint dstOffset, jint count, jboolean swap) { +static void Memory_peekFloatArray(JNIEnv* env, jclass, jlong srcAddress, jfloatArray dst, jint dstOffset, jint count, jboolean swap) { PEEKER(jfloat, Float, jint, swapInts); } -static void Memory_peekIntArray(JNIEnv* env, jclass, jint srcAddress, jintArray dst, jint dstOffset, jint count, jboolean swap) { +static void Memory_peekIntArray(JNIEnv* env, jclass, jlong srcAddress, jintArray dst, jint dstOffset, jint count, jboolean swap) { PEEKER(jint, Int, jint, swapInts); } -static void Memory_peekLongArray(JNIEnv* env, jclass, jint srcAddress, jlongArray dst, jint dstOffset, jint count, jboolean swap) { +static void Memory_peekLongArray(JNIEnv* env, jclass, jlong srcAddress, jlongArray dst, jint dstOffset, jint count, jboolean swap) { PEEKER(jlong, Long, jlong, swapLongs); } -static void Memory_peekShortArray(JNIEnv* env, jclass, jint srcAddress, jshortArray dst, jint dstOffset, jint count, jboolean swap) { +static void Memory_peekShortArray(JNIEnv* env, jclass, jlong srcAddress, jshortArray dst, jint dstOffset, jint count, jboolean swap) { PEEKER(jshort, Short, jshort, swapShorts); } -static void Memory_pokeByte(JNIEnv*, jclass, jint dstAddress, jbyte value) { +static void Memory_pokeByte(JNIEnv*, jclass, jlong dstAddress, jbyte value) { *cast<jbyte*>(dstAddress) = value; } -static void Memory_pokeByteArray(JNIEnv* env, jclass, jint dstAddress, jbyteArray src, jint offset, jint length) { +static void Memory_pokeByteArray(JNIEnv* env, jclass, jlong dstAddress, jbyteArray src, jint offset, jint length) { env->GetByteArrayRegion(src, offset, length, cast<jbyte*>(dstAddress)); } @@ -235,31 +235,31 @@ static void Memory_pokeByteArray(JNIEnv* env, jclass, jint dstAddress, jbyteArra } \ } -static void Memory_pokeCharArray(JNIEnv* env, jclass, jint dstAddress, jcharArray src, jint srcOffset, jint count, jboolean swap) { +static void Memory_pokeCharArray(JNIEnv* env, jclass, jlong dstAddress, jcharArray src, jint srcOffset, jint count, jboolean swap) { POKER(jchar, Char, jshort, swapShorts); } -static void Memory_pokeDoubleArray(JNIEnv* env, jclass, jint dstAddress, jdoubleArray src, jint srcOffset, jint count, jboolean swap) { +static void Memory_pokeDoubleArray(JNIEnv* env, jclass, jlong dstAddress, jdoubleArray src, jint srcOffset, jint count, jboolean swap) { POKER(jdouble, Double, jlong, swapLongs); } -static void Memory_pokeFloatArray(JNIEnv* env, jclass, jint dstAddress, jfloatArray src, jint srcOffset, jint count, jboolean swap) { +static void Memory_pokeFloatArray(JNIEnv* env, jclass, jlong dstAddress, jfloatArray src, jint srcOffset, jint count, jboolean swap) { POKER(jfloat, Float, jint, swapInts); } -static void Memory_pokeIntArray(JNIEnv* env, jclass, jint dstAddress, jintArray src, jint srcOffset, jint count, jboolean swap) { +static void Memory_pokeIntArray(JNIEnv* env, jclass, jlong dstAddress, jintArray src, jint srcOffset, jint count, jboolean swap) { POKER(jint, Int, jint, swapInts); } -static void Memory_pokeLongArray(JNIEnv* env, jclass, jint dstAddress, jlongArray src, jint srcOffset, jint count, jboolean swap) { +static void Memory_pokeLongArray(JNIEnv* env, jclass, jlong dstAddress, jlongArray src, jint srcOffset, jint count, jboolean swap) { POKER(jlong, Long, jlong, swapLongs); } -static void Memory_pokeShortArray(JNIEnv* env, jclass, jint dstAddress, jshortArray src, jint srcOffset, jint count, jboolean swap) { +static void Memory_pokeShortArray(JNIEnv* env, jclass, jlong dstAddress, jshortArray src, jint srcOffset, jint count, jboolean swap) { POKER(jshort, Short, jshort, swapShorts); } -static jshort Memory_peekShort(JNIEnv*, jclass, jint srcAddress, jboolean swap) { +static jshort Memory_peekShort(JNIEnv*, jclass, jlong srcAddress, jboolean swap) { jshort result = *cast<const jshort*>(srcAddress); if (swap) { result = bswap_16(result); @@ -267,14 +267,14 @@ static jshort Memory_peekShort(JNIEnv*, jclass, jint srcAddress, jboolean swap) return result; } -static void Memory_pokeShort(JNIEnv*, jclass, jint dstAddress, jshort value, jboolean swap) { +static void Memory_pokeShort(JNIEnv*, jclass, jlong dstAddress, jshort value, jboolean swap) { if (swap) { value = bswap_16(value); } *cast<jshort*>(dstAddress) = value; } -static jint Memory_peekInt(JNIEnv*, jclass, jint srcAddress, jboolean swap) { +static jint Memory_peekInt(JNIEnv*, jclass, jlong srcAddress, jboolean swap) { jint result = *cast<const jint*>(srcAddress); if (swap) { result = bswap_32(result); @@ -282,14 +282,14 @@ static jint Memory_peekInt(JNIEnv*, jclass, jint srcAddress, jboolean swap) { return result; } -static void Memory_pokeInt(JNIEnv*, jclass, jint dstAddress, jint value, jboolean swap) { +static void Memory_pokeInt(JNIEnv*, jclass, jlong dstAddress, jint value, jboolean swap) { if (swap) { value = bswap_32(value); } *cast<jint*>(dstAddress) = value; } -static jlong Memory_peekLong(JNIEnv*, jclass, jint srcAddress, jboolean swap) { +static jlong Memory_peekLong(JNIEnv*, jclass, jlong srcAddress, jboolean swap) { jlong result; const jlong* src = cast<const jlong*>(srcAddress); if ((srcAddress & LONG_ALIGNMENT_MASK) == 0) { @@ -303,7 +303,7 @@ static jlong Memory_peekLong(JNIEnv*, jclass, jint srcAddress, jboolean swap) { return result; } -static void Memory_pokeLong(JNIEnv*, jclass, jint dstAddress, jlong value, jboolean swap) { +static void Memory_pokeLong(JNIEnv*, jclass, jlong dstAddress, jlong value, jboolean swap) { jlong* dst = cast<jlong*>(dstAddress); if (swap) { value = bswap_64(value); @@ -373,28 +373,28 @@ static void Memory_unsafeBulkPut(JNIEnv* env, jclass, jbyteArray dstArray, jint static JNINativeMethod gMethods[] = { NATIVE_METHOD(Memory, memmove, "(Ljava/lang/Object;ILjava/lang/Object;IJ)V"), - NATIVE_METHOD(Memory, peekByte, "!(I)B"), - NATIVE_METHOD(Memory, peekByteArray, "(I[BII)V"), - NATIVE_METHOD(Memory, peekCharArray, "(I[CIIZ)V"), - NATIVE_METHOD(Memory, peekDoubleArray, "(I[DIIZ)V"), - NATIVE_METHOD(Memory, peekFloatArray, "(I[FIIZ)V"), - NATIVE_METHOD(Memory, peekInt, "!(IZ)I"), - NATIVE_METHOD(Memory, peekIntArray, "(I[IIIZ)V"), - NATIVE_METHOD(Memory, peekLong, "!(IZ)J"), - NATIVE_METHOD(Memory, peekLongArray, "(I[JIIZ)V"), - NATIVE_METHOD(Memory, peekShort, "!(IZ)S"), - NATIVE_METHOD(Memory, peekShortArray, "(I[SIIZ)V"), - NATIVE_METHOD(Memory, pokeByte, "!(IB)V"), - NATIVE_METHOD(Memory, pokeByteArray, "(I[BII)V"), - NATIVE_METHOD(Memory, pokeCharArray, "(I[CIIZ)V"), - NATIVE_METHOD(Memory, pokeDoubleArray, "(I[DIIZ)V"), - NATIVE_METHOD(Memory, pokeFloatArray, "(I[FIIZ)V"), - NATIVE_METHOD(Memory, pokeInt, "!(IIZ)V"), - NATIVE_METHOD(Memory, pokeIntArray, "(I[IIIZ)V"), - NATIVE_METHOD(Memory, pokeLong, "!(IJZ)V"), - NATIVE_METHOD(Memory, pokeLongArray, "(I[JIIZ)V"), - NATIVE_METHOD(Memory, pokeShort, "!(ISZ)V"), - NATIVE_METHOD(Memory, pokeShortArray, "(I[SIIZ)V"), + NATIVE_METHOD(Memory, peekByte, "!(J)B"), + NATIVE_METHOD(Memory, peekByteArray, "(J[BII)V"), + NATIVE_METHOD(Memory, peekCharArray, "(J[CIIZ)V"), + NATIVE_METHOD(Memory, peekDoubleArray, "(J[DIIZ)V"), + NATIVE_METHOD(Memory, peekFloatArray, "(J[FIIZ)V"), + NATIVE_METHOD(Memory, peekInt, "!(JZ)I"), + NATIVE_METHOD(Memory, peekIntArray, "(J[IIIZ)V"), + NATIVE_METHOD(Memory, peekLong, "!(JZ)J"), + NATIVE_METHOD(Memory, peekLongArray, "(J[JIIZ)V"), + NATIVE_METHOD(Memory, peekShort, "!(JZ)S"), + NATIVE_METHOD(Memory, peekShortArray, "(J[SIIZ)V"), + NATIVE_METHOD(Memory, pokeByte, "!(JB)V"), + NATIVE_METHOD(Memory, pokeByteArray, "(J[BII)V"), + NATIVE_METHOD(Memory, pokeCharArray, "(J[CIIZ)V"), + NATIVE_METHOD(Memory, pokeDoubleArray, "(J[DIIZ)V"), + NATIVE_METHOD(Memory, pokeFloatArray, "(J[FIIZ)V"), + NATIVE_METHOD(Memory, pokeInt, "!(JIZ)V"), + NATIVE_METHOD(Memory, pokeIntArray, "(J[IIIZ)V"), + NATIVE_METHOD(Memory, pokeLong, "!(JJZ)V"), + NATIVE_METHOD(Memory, pokeLongArray, "(J[JIIZ)V"), + NATIVE_METHOD(Memory, pokeShort, "!(JSZ)V"), + NATIVE_METHOD(Memory, pokeShortArray, "(J[SIIZ)V"), NATIVE_METHOD(Memory, unsafeBulkGet, "(Ljava/lang/Object;II[BIIZ)V"), NATIVE_METHOD(Memory, unsafeBulkPut, "([BIILjava/lang/Object;IIZ)V"), }; |