A set of non-overlapping
On addition, ranges that would overlap with the inserted value are merged with the inserted value.
||Creates a new set.|
||Iterates on the memory ranges in the set.|
||Returns the number of ranges in the set.|
||Adds the passed memory range to the set.|
||Removes the passed memory range from the set.|
def __init__(self, items=()):
Creates a new set.
|items:||An iterator over the ranges initially present in the set. Overlapping ranges will be merged upon addition.|
Iterates on the memory ranges in the set.
def add(self, memory_range):
Adds the passed memory range to the set.
The passed memory range can overlap with existing ranges in the set. In that case, the ranges will be merged.
def remove(self, memory_range):
Removes the passed memory range from the set.
This will remove the intersection between the passed memory range and any range that overlaps with it.