@Override public NativeAllocator newAllocator() { return new NativeAllocator(this); } }
public long allocate(int size, OpOrder.Group opGroup) { assert size >= 0; offHeap().allocate(size, opGroup); // satisfy large allocations directly from JVM since they don't cause fragmentation // as badly, and fill up our regions quickly if (size > MAX_CLONED_SIZE) return allocateOversize(size); while (true) { Region region = currentRegion.get(); long peer; if (region != null && (peer = region.allocate(size)) > 0) return peer; trySwapRegion(region, size); } }
public NativeDecoratedKey(Token token, NativeAllocator allocator, OpOrder.Group writeOp, ByteBuffer key) { super(token); assert key != null; assert key.order() == ByteOrder.BIG_ENDIAN; int size = key.remaining(); this.peer = allocator.allocate(4 + size, writeOp); MemoryUtil.setInt(peer, size); MemoryUtil.setBytes(peer + 4, key); }
public NativeDecoratedKey(Token token, NativeAllocator allocator, OpOrder.Group writeOp, ByteBuffer key) { super(token); assert key != null; assert key.order() == ByteOrder.BIG_ENDIAN; int size = key.remaining(); this.peer = allocator.allocate(4 + size, writeOp); MemoryUtil.setInt(peer, size); MemoryUtil.setBytes(peer + 4, key); }
public long allocate(int size, OpOrder.Group opGroup) { assert size >= 0; offHeap().allocate(size, opGroup); // satisfy large allocations directly from JVM since they don't cause fragmentation // as badly, and fill up our regions quickly if (size > MAX_CLONED_SIZE) return allocateOversize(size); while (true) { Region region = currentRegion.get(); long peer; if (region != null && (peer = region.allocate(size)) > 0) return peer; trySwapRegion(region, size); } }
public NativeDecoratedKey(Token token, NativeAllocator allocator, OpOrder.Group writeOp, ByteBuffer key) { super(token); assert key != null; assert key.order() == ByteOrder.BIG_ENDIAN; int size = key.remaining(); this.peer = allocator.allocate(4 + size, writeOp); MemoryUtil.setInt(peer, size); MemoryUtil.setBytes(peer + 4, key); }
@Override public NativeAllocator newAllocator() { return new NativeAllocator(this); } }
public long allocate(int size, OpOrder.Group opGroup) { assert size >= 0; offHeap().allocate(size, opGroup); // satisfy large allocations directly from JVM since they don't cause fragmentation // as badly, and fill up our regions quickly if (size > MAX_CLONED_SIZE) return allocateOversize(size); while (true) { Region region = currentRegion.get(); long peer; if (region != null && (peer = region.allocate(size)) > 0) return peer; trySwapRegion(region, size); } }
public NativeDecoratedKey(Token token, NativeAllocator allocator, OpOrder.Group writeOp, ByteBuffer key) { super(token); assert key != null; assert key.order() == ByteOrder.BIG_ENDIAN; int size = key.remaining(); this.peer = allocator.allocate(4 + size, writeOp); MemoryUtil.setInt(peer, size); MemoryUtil.setBytes(peer + 4, key); }
@Override public NativeAllocator newAllocator() { return new NativeAllocator(this); } }
public long allocate(int size, OpOrder.Group opGroup) { assert size >= 0; offHeap().allocate(size, opGroup); // satisfy large allocations directly from JVM since they don't cause fragmentation // as badly, and fill up our regions quickly if (size > MAX_CLONED_SIZE) return allocateOversize(size); while (true) { Region region = currentRegion.get(); long peer; if (region != null && (peer = region.allocate(size)) > 0) return peer; trySwapRegion(region, size); } }
public NativeDecoratedKey(Token token, NativeAllocator allocator, OpOrder.Group writeOp, ByteBuffer key) { super(token); assert key != null; int size = key.remaining(); this.peer = allocator.allocate(4 + size, writeOp); MemoryUtil.setInt(peer, size); MemoryUtil.setBytes(peer + 4, key); }
@Override public NativeAllocator newAllocator() { return new NativeAllocator(this); } }
public long allocate(int size, OpOrder.Group opGroup) { assert size >= 0; offHeap().allocate(size, opGroup); // satisfy large allocations directly from JVM since they don't cause fragmentation // as badly, and fill up our regions quickly if (size > MAX_CLONED_SIZE) return allocateOversize(size, opGroup); while (true) { Region region = currentRegion.get(); long peer; if (region != null && (peer = region.allocate(size)) > 0) return peer; trySwapRegion(region, size); } }
public AbstractNativeCell(NativeAllocator allocator, OpOrder.Group writeOp, Cell copyOf) { int size = sizeOf(copyOf); peer = allocator.allocate(size, writeOp); MemoryUtil.setInt(peer, size); construct(copyOf); }
@Override public NativeAllocator newAllocator() { return new NativeAllocator(this); } }
peer = allocator.allocate((int) size, writeOp); MemoryUtil.setByte(peer + HAS_CELLPATH, (byte)(path == null ? 0 : 1)); MemoryUtil.setLong(peer + TIMESTAMP, timestamp);
assert dataSize < 64 << 10; peer = allocator.allocate(metadataSize + dataSize + bitmapSize, writeOp); long bitmapStart = peer + metadataSize; MemoryUtil.setShort(peer, (short) count);
peer = allocator.allocate((int) size, writeOp); MemoryUtil.setByte(peer + HAS_CELLPATH, (byte)(path == null ? 0 : 1)); MemoryUtil.setLong(peer + TIMESTAMP, timestamp);
assert dataSize < 64 << 10; peer = allocator.allocate(metadataSize + dataSize + bitmapSize, writeOp); long bitmapStart = peer + metadataSize; MemoryUtil.setShort(peer, (short) count);