private void adjustSpace(int newSize) {
        if (newSize < 10) {
            newSize = 10;
        }
        short[] newshorts = new short[newSize];
        int pos = 1;
        for(int i=0;i<starts.length;i++) {
            if (starts[i] > 0) {
                System.arraycopy(shorts,starts[i],newshorts,pos,lengths[i]);
                starts[i] = pos;
                pos += lengths[i];
            }
        }
        nextFree = pos;
        shorts = newshorts;
    }
Adjusts the buffer size as the storage requirements change.
Every time the buffer is resized, arrays are compacted.
@param newSize the new size to adjust the buffer to
Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/ShortArrayArray.java