presto-array/src/main/java/io/prestosql/array/IntBigArray.java/IntBigArray/ensureCapacity
class IntBigArray:    public void ensureCapacity(long length)
    {
        if (capacity > length) {
            return;
        }

        grow(length);
    }