private static long addr(AbstractByteBuf wrapped, int index) { // We need to call wrapped.memoryAddress() everytime and NOT cache it as it may change if the buffer expand. // See: // - https://github.com/netty/netty/issues/2587 // - https://github.com/netty/netty/issues/2580 return wrapped.memoryAddress() + index; }
private static long addr(AbstractByteBuf wrapped, int index) { // We need to call wrapped.memoryAddress() everytime and NOT cache it as it may change if the buffer expand. // See: // - https://github.com/netty/netty/issues/2587 // - https://github.com/netty/netty/issues/2580 return wrapped.memoryAddress() + index; }
private static long addr(AbstractByteBuf wrapped, int index) { // We need to call wrapped.memoryAddress() everytime and NOT cache it as it may change if the buffer expand. // See: // - https://github.com/netty/netty/issues/2587 // - https://github.com/netty/netty/issues/2580 return wrapped.memoryAddress() + index; }
@Override public long memoryAddress() { return unwrap().memoryAddress(); }
@Override public long memoryAddress() { return unwrap().memoryAddress() + adjustment; }
@Override public long memoryAddress() { return unwrap().memoryAddress() + adjustment; }
@Override public long memoryAddress() { return unwrap().memoryAddress(); }
@Override public long memoryAddress() { return unwrap().memoryAddress(); }
@Override public long memoryAddress() { return unwrap().memoryAddress() + adjustment; }
private UnsafeDirectLittleEndian(AbstractByteBuf buf, boolean fake, AtomicLong bufferCount, AtomicLong bufferSize) { super(buf); if (!NATIVE_ORDER || buf.order() != ByteOrder.BIG_ENDIAN) { throw new IllegalStateException("Drill only runs on LittleEndian systems."); } this.bufferCount = bufferCount; this.bufferSize = bufferSize; // initCap is used if we're tracking memory release. If we're in non-debug mode, we'll skip this. this.initCap = ASSERT_ENABLED ? buf.capacity() : -1; this.wrapped = buf; this.memoryAddress = buf.memoryAddress(); }
private static long addr(AbstractByteBuf wrapped, int index) { // We need to call wrapped.memoryAddress() everytime and NOT cache it as it may change if the buffer expand. // See: // - https://github.com/netty/netty/issues/2587 // - https://github.com/netty/netty/issues/2580 return wrapped.memoryAddress() + index; }
@Override public long memoryAddress() { return unwrap().memoryAddress() + adjustment; }
@Override public long memoryAddress() { return unwrap().memoryAddress(); }
private static long addr(AbstractByteBuf wrapped, int index) { // We need to call wrapped.memoryAddress() everytime and NOT cache it as it may change if the buffer expand. // See: // - https://github.com/netty/netty/issues/2587 // - https://github.com/netty/netty/issues/2580 return wrapped.memoryAddress() + index; }
private static long addr(AbstractByteBuf wrapped, int index) { // We need to call wrapped.memoryAddress() everytime and NOT cache it as it may change if the buffer expand. // See: // - https://github.com/netty/netty/issues/2587 // - https://github.com/netty/netty/issues/2580 return wrapped.memoryAddress() + index; }
private static long addr(AbstractByteBuf wrapped, int index) { // We need to call wrapped.memoryAddress() everytime and NOT cache it as it may change if the buffer expand. // See: // - https://github.com/netty/netty/issues/2587 // - https://github.com/netty/netty/issues/2580 return wrapped.memoryAddress() + index; }
private UnsafeDirectLittleEndian(AbstractByteBuf buf, boolean fake) { super(buf); if (!NATIVE_ORDER || buf.order() != ByteOrder.BIG_ENDIAN) { throw new IllegalStateException("Arrow only runs on LittleEndian systems."); } this.wrapped = buf; this.memoryAddress = buf.memoryAddress(); }
@Override public long memoryAddress() { return unwrap().memoryAddress(); }
@Override public long memoryAddress() { return unwrap().memoryAddress() + adjustment; }
private UnsafeDirectLittleEndian(AbstractByteBuf buf, boolean fake, AtomicLong bufferCount, AtomicLong bufferSize) { super(buf); if (!NATIVE_ORDER || buf.order() != ByteOrder.BIG_ENDIAN) { throw new IllegalStateException("Drill only runs on LittleEndian systems."); } this.bufferCount = bufferCount; this.bufferSize = bufferSize; // initCap is used if we're tracking memory release. If we're in non-debug mode, we'll skip this. this.initCap = ASSERT_ENABLED ? buf.capacity() : -1; this.wrapped = buf; this.memoryAddress = buf.memoryAddress(); }