Lines Matching refs:ofs
47 private static void set(byte[] b, int ofs, int len, int value) {
49 b[ofs + i] = (byte)value;
53 private static void check(byte[] b, int ofs, int len, int value) {
55 int r = b[ofs + i] & 0xff;
62 private static void set(Unsafe unsafe, long addr, int ofs, int len, int value) {
64 unsafe.putByte(null, addr + ofs + i, (byte)value);
68 private static void check(Unsafe unsafe, long addr, int ofs, int len, int value) {
70 int r = unsafe.getByte(null, addr + ofs + i) & 0xff;
93 int ofs = random.nextInt(BUFFER_SIZE / 2);
96 unsafe.setMemory(b, Unsafe.ARRAY_BYTE_BASE_OFFSET + ofs, len, (byte)val);
97 check(b, 0, ofs - 1, FILLER);
98 check(b, ofs, len, val);
99 check(b, ofs + len, BUFFER_SIZE - (ofs + len), FILLER);
108 int ofs = random.nextInt(BUFFER_SIZE / 2);
111 unsafe.setMemory(null, b + ofs, len, (byte)val);
112 check(unsafe, b, 0, ofs - 1, FILLER);
113 check(unsafe, b, ofs, len, val);
114 check(unsafe, b, ofs + len, BUFFER_SIZE - (ofs + len), FILLER);
125 int ofs = random.nextInt(BUFFER_SIZE / 2);
128 set(b1, ofs, len, val);
130 unsafe.copyMemory(b1, Unsafe.ARRAY_BYTE_BASE_OFFSET + ofs,
145 int ofs = random.nextInt(BUFFER_SIZE / 2);
148 set(b1, ofs, len, val);
150 unsafe.copyMemory(b1, Unsafe.ARRAY_BYTE_BASE_OFFSET + ofs,
165 int ofs = random.nextInt(BUFFER_SIZE / 2);
168 set(unsafe, b1, ofs, len, val);
170 unsafe.copyMemory(null, b1 + ofs,
185 int ofs = random.nextInt(BUFFER_SIZE / 2);
188 set(unsafe, b1, ofs, len, val);
190 unsafe.copyMemory(null, b1 + ofs,