}
}
+#ifndef NDEBUG
+ if (it != regionMap.end()) {
+ assert(contains(it, address) || it->first > address);
+ }
+#endif
+
return it;
}
upperBound(unsigned long long address) {
RegionMap::iterator it = regionMap.upper_bound(address);
+#ifndef NDEBUG
+ if (it != regionMap.end()) {
+ assert(it->first >= address);
+ }
+#endif
+
return it;
}
#ifndef NDEBUG
RegionMap::iterator start = lowerBound(address);
- RegionMap::iterator stop = upperBound(address + size);
+ RegionMap::iterator stop = upperBound(address + size - 1);
if (0) {
// Forget all regions that intersect this new one.
regionMap.erase(start, stop);