private void adjustArraySizes(int size) {
        if (size < MIN_SIZE) {
            size = MIN_SIZE;
        }
        
        int len = Math.min(size,starts.length);
        int[] newStarts = new int[size];
        short[] newLengths = new short[size];
            
        System.arraycopy(starts,0,newStarts,0,len);
        System.arraycopy(lengths,0,newLengths,0,len);
        starts = newStarts;
        lengths = newLengths;
    }
Grows the array.  The new array capacity will be
the maximum of minCapacity and twice the current
capacity.
@param minCapacity The minimum size to grow the array.
Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/FloatArrayArray.java