/** * Returns the amount of memory in bytes used off heap. * @return the amount of memory in bytes used off heap */ public long offHeapSize() { return chunkOffsets.size(); }
@Override public long offHeapSize() { return bytes.size(); }
@Override public long offHeapSize() { return bytes.size(); }
/** * Returns the amount of memory in bytes used off heap. * @return the amount of memory in bytes used off heap */ public long offHeapSize() { return chunkOffsets.size(); }
@Override public long offHeapSize() { return bytes.size(); }
@Override public long offHeapSize() { return bytes.size(); }
/** * Returns the amount of memory in bytes used off heap. * @return the amount of memory in bytes used off heap */ public long offHeapSize() { return chunkOffsets.size(); }
public long capacity() { return bytes.size() * 8; }
@Override public int hashCode() { // Similar to open bitset. long h = 0; for (long i = bytes.size(); --i >= 0;) { h ^= bytes.getByte(i); h = (h << 1) | (h >>> 63); // rotate left } return (int) ((h >> 32) ^ h) + 0x98761234; }
@Override public int hashCode() { // Similar to open bitset. long h = 0; for (long i = bytes.size(); --i >= 0;) { h ^= bytes.getByte(i); h = (h << 1) | (h >>> 63); // rotate left } return (int) ((h >> 32) ^ h) + 0x98761234; }
@Override public int hashCode() { // Similar to open bitset. long h = 0; for (long i = bytes.size(); --i >= 0;) { h ^= bytes.getByte(i); h = (h << 1) | (h >>> 63); // rotate left } return (int) ((h >> 32) ^ h) + 0x98761234; }
@Override public int hashCode() { // Similar to open bitset. long h = 0; for (long i = bytes.size(); --i >= 0;) { h ^= bytes.getByte(i); h = (h << 1) | (h >>> 63); // rotate left } return (int) ((h >> 32) ^ h) + 0x98761234; }
public void clear() { bytes.setMemory(0, bytes.size(), (byte) 0); }
public Memory copy(long newSize) { Memory copy = Memory.allocate(newSize); copy.put(0, this, 0, Math.min(size(), newSize)); return copy; }
public Memory copy(long newSize) { Memory copy = Memory.allocate(newSize); copy.put(0, this, 0, Math.min(size(), newSize)); return copy; }
public Memory copy(long newSize) { Memory copy = Memory.allocate(newSize); copy.put(0, this, 0, Math.min(size(), newSize)); return copy; }
public Memory copy(long newSize) { Memory copy = Memory.allocate(newSize); copy.put(0, this, 0, Math.min(size(), newSize)); return copy; }
@Override protected void reBuffer() throws IOException { if (offset - mem.peer >= mem.size()) return; buffer = getByteBuffer(offset, Math.min(bufferSize, Ints.saturatedCast(memRemaining()))); offset += buffer.capacity(); }
@Override protected void reBuffer() throws IOException { if (offset - mem.peer >= mem.size()) return; buffer = getByteBuffer(offset, Math.min(bufferSize, Ints.saturatedCast(memRemaining()))); offset += buffer.capacity(); }