@Override public long getSizeInBytes() { return keyBlock.getRegionSizeInBytes(offset / 2, positionCount / 2) + valueBlock.getRegionSizeInBytes(offset / 2, positionCount / 2) + sizeOfIntArray(positionCount / 2 * HASH_MULTIPLIER); }
public static long sizeOf(int[] array) { return (array == null) ? 0 : sizeOfIntArray(array.length); }
public static long sizeOf(int[] array) { return (array == null) ? 0 : sizeOfIntArray(array.length); }
@Override public long getSizeInBytes() { return keyBlock.getRegionSizeInBytes(offset / 2, positionCount / 2) + valueBlock.getRegionSizeInBytes(offset / 2, positionCount / 2) + sizeOfIntArray(positionCount / 2 * HASH_MULTIPLIER); }
@Override public long getSizeInBytes() { return keyBlock.getRegionSizeInBytes(offset / 2, positionCount / 2) + valueBlock.getRegionSizeInBytes(offset / 2, positionCount / 2) + sizeOfIntArray(positionCount / 2 * HASH_MULTIPLIER); }
/** * Creates a slice over the specified array range. * * @param offset the array position at which the slice begins * @param length the number of array positions to include in the slice */ Slice(int[] base, int offset, int length) { requireNonNull(base, "base is null"); checkPositionIndexes(offset, offset + length, base.length); this.base = base; this.address = sizeOfIntArray(offset); this.size = multiplyExact(length, ARRAY_INT_INDEX_SCALE); this.retainedSize = INSTANCE_SIZE + sizeOf(base); this.reference = (offset == 0 && length == base.length) ? COMPACT : NOT_COMPACT; }
/** * Creates a slice over the specified array range. * * @param offset the array position at which the slice begins * @param length the number of array positions to include in the slice */ Slice(int[] base, int offset, int length) { requireNonNull(base, "base is null"); checkPositionIndexes(offset, offset + length, base.length); this.base = base; this.address = sizeOfIntArray(offset); this.size = multiplyExact(length, ARRAY_INT_INDEX_SCALE); this.retainedSize = INSTANCE_SIZE + sizeOf(base); this.reference = (offset == 0 && length == base.length) ? COMPACT : NOT_COMPACT; }
size = sizeOfIntArray(hashSize) + sizeOfBooleanArray(hashSize) + sizeOfIntArray(addresses.size()) + sizeOf(addresses.elements()) + pagesHashStrategy.getSizeInBytes();