private void init(boolean rebuildAddrToIndexMap) {
		allKeyRanges = null;
		sortedBaseEndAddrs = new Address[baseAddrs.length];
		sortedBaseStartAddrs = new Address[baseAddrs.length];
		System.arraycopy(baseAddrs, 0, sortedBaseStartAddrs, 0, baseAddrs.length);
		Arrays.sort(sortedBaseStartAddrs);
		for (int i = 0; i < sortedBaseStartAddrs.length; i++) {
			long max = sortedBaseStartAddrs[i].getAddressSpace().getMaxAddress().getOffset();
			max = max < 0 ? MAX_OFFSET : Math.min(max, MAX_OFFSET);
			long off = sortedBaseStartAddrs[i].getOffset() | max;
			sortedBaseEndAddrs[i] =
				sortedBaseStartAddrs[i].getAddressSpace().getAddressInThisSpaceOnly(off);
		}
		if (rebuildAddrToIndexMap) {
			addrToIndexMap.clear();
			for (int i = 0; i < baseAddrs.length; i++) {
				addrToIndexMap.put(baseAddrs[i], i);
			}
		}
	}
Notification when the memory map changes.  If we are segemented, we need to update our
list of address ranges used for address normalization.
@param mem the changed memory map.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/map/AddressMapDB.java