presto-spi/src/main/java/io/prestosql/spi/block/VariableWidthBlockBuilder.java/VariableWidthBlockBuilder/getRegionSizeInBytes
class VariableWidthBlockBuilder:    @Override
    public long getRegionSizeInBytes(int positionOffset, int length)
    {
        int positionCount = getPositionCount();
        checkValidRegion(positionCount, positionOffset, length);
        long arraysSizeInBytes = (Integer.BYTES + Byte.BYTES) * (long) length;
        return getOffset(positionOffset + length) - getOffset(positionOffset) + arraysSizeInBytes;
    }