Recycler.recycle

Recycles the segments. Goes over the list of recycle_segments. First it takes the lowerbound. If there is a element in the lowerbound, the index of the current segment is changed to the one of the lowerbound.back and the lower_range.back is removed. The same step is used for the upperbound using the front of the elements. We go over all the new segments that needs to be recycled. First we get lowerBound in the indices. The indices are sorted by index meaning we get all sgements by indices as a range that are smaller or equal to our segment. If the segments connext we add remove it and create a new one. The same procedure is used for the upperrange.

struct Recycler
void
recycle

Parameters

recycle_segments RecycleSegment*[]

newly disposed segments