public int allocate() {
        if (freeList.size() == 0) {
            if (nextIndex < 0) {
                throw new IndexOutOfBoundsException();
            }
            int temp = nextIndex;
            nextIndex++;
            return temp;            
        }
        Integer i = freeList.remove(freeList.size()-1);
        return i.intValue();
    }
Returns the smallest unused index value.
@exception IndexOutOfBoundsException thrown if there are no unused
indexes.
Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/IntIndexManager.java