'Returns the next free position with respect to an address, including that address itself
:param address: The address to begin the search with (including itself)
:return: The next free position'

def next_free_pos(self, address):

    idx = self._search(address)
    if ((idx < len(self._list)) and (self._list[idx].start <= address < self._list[idx].end)):
        i = idx
        while (((i + 1) < len(self._list)) and (self._list[i].end == self._list[(i + 1)].start)):
            i += 1
        if (i == len(self._list)):
            return self._list[(-1)].end
        return self._list[i].end
    return address
