@TestTargetNew( level = TestLevel.PARTIAL_COMPLETE, notes = "", method = "memset", args = {} ) public void testMemset() { IMemorySystem memory = Platform.getMemorySystem(); int byteCount = 32; int ptr = memory.malloc(byteCount); try { memory.setByte(ptr, (byte) 1); assertEquals((byte) 1, memory.getByte(ptr)); memory.memset(ptr, (byte) 0, byteCount); assertBytesEqual((byte) 0, ptr, byteCount); memory.memset(ptr, (byte) 1, byteCount); assertBytesEqual((byte) 1, ptr, byteCount); } finally { memory.free(ptr); } }
public native void memset(int address, byte value, long length);
OSMemory implements IMemorySystem { public native void memset(int address, byte value, long length); }
OSMemory implements IMemorySystem { public native void memset(int address, byte value, long length); private  OSMemory(); }
OSMemory implements IMemorySystem { public native void memset(int address, byte value, long length); private  OSMemory(); static OSMemory getOSMemory(); boolean isLittleEndian(); Endianness getNativeOrder(); int getPointerSize(); native int malloc(int length); native void free(int address); native void memset(int address, byte value, long length); native void memmove(int destAddress, int srcAddress, long length); native void getByteArray(int address, byte[] bytes, int offset,
            int length); native void setByteArray(int address, byte[] bytes, int offset,
            int length); native void setShortArray(int address, short[] shorts, int offset,
            int length, boolean swap); native void setIntArray(int address, int[] ints, int offset,
            int length, boolean swap); native byte getByte(int address); native void setByte(int address, byte value); native short getShort(int address); short getShort(int address, Endianness endianness); native void setShort(int address, short value); void setShort(int address, short value, Endianness endianness); native int getInt(int address); int getInt(int address, Endianness endianness); native void setInt(int address, int value); void setInt(int address, int value, Endianness endianness); native long getLong(int address); long getLong(int address, Endianness endianness); native void setLong(int address, long value); void setLong(int address, long value, Endianness endianness); native float getFloat(int address); float getFloat(int address, Endianness endianness); native void setFloat(int address, float value); void setFloat(int address, float value, Endianness endianness); native double getDouble(int address); double getDouble(int address, Endianness endianness); native void setDouble(int address, double value); void setDouble(int address, double value, Endianness endianness); native int getAddress(int address); native void setAddress(int address, int value); int mmap(int fileDescriptor, long alignment, long size,
            int mapMode); void unmap(int addr, long size); void load(int addr, long size); boolean isLoaded(int addr, long size); void flush(int addr, long size); }
OSMemory implements IMemorySystem { public native void memset(int address, byte value, long length); private  OSMemory(); static OSMemory getOSMemory(); boolean isLittleEndian(); Endianness getNativeOrder(); int getPointerSize(); native int malloc(int length); native void free(int address); native void memset(int address, byte value, long length); native void memmove(int destAddress, int srcAddress, long length); native void getByteArray(int address, byte[] bytes, int offset,
            int length); native void setByteArray(int address, byte[] bytes, int offset,
            int length); native void setShortArray(int address, short[] shorts, int offset,
            int length, boolean swap); native void setIntArray(int address, int[] ints, int offset,
            int length, boolean swap); native byte getByte(int address); native void setByte(int address, byte value); native short getShort(int address); short getShort(int address, Endianness endianness); native void setShort(int address, short value); void setShort(int address, short value, Endianness endianness); native int getInt(int address); int getInt(int address, Endianness endianness); native void setInt(int address, int value); void setInt(int address, int value, Endianness endianness); native long getLong(int address); long getLong(int address, Endianness endianness); native void setLong(int address, long value); void setLong(int address, long value, Endianness endianness); native float getFloat(int address); float getFloat(int address, Endianness endianness); native void setFloat(int address, float value); void setFloat(int address, float value, Endianness endianness); native double getDouble(int address); double getDouble(int address, Endianness endianness); native void setDouble(int address, double value); void setDouble(int address, double value, Endianness endianness); native int getAddress(int address); native void setAddress(int address, int value); int mmap(int fileDescriptor, long alignment, long size,
            int mapMode); void unmap(int addr, long size); void load(int addr, long size); boolean isLoaded(int addr, long size); void flush(int addr, long size); static final int POINTER_SIZE; static final Endianness NATIVE_ORDER; }