private void checkMemoryWriteMappedBlock(MemoryBlockDB mappedBlock, Address start,
			Address endAddr) throws AddressOverflowException, MemoryAccessException {
		long startOffset = start.subtract(mappedBlock.getStart());
		long endOffset = endAddr.subtract(mappedBlock.getStart());

		// determine source block(s) for mapped block
		MemoryBlockSourceInfo info = mappedBlock.getSourceInfos().get(0);
		AddressRange mappedRange = info.getMappedRange().get();
		Address mappedRangeMinAddr = mappedRange.getMinAddress();

		Address mappedStartAddress, mappedEndAddress;
		if (mappedBlock.getType() == MemoryBlockType.BIT_MAPPED) {
			mappedStartAddress = mappedRangeMinAddr.addNoWrap(startOffset / 8);
			mappedEndAddress = mappedRangeMinAddr.addNoWrap(endOffset / 8);
		}
		else { // BYTE_MAPPED
			ByteMappingScheme byteMappingScheme = info.getByteMappingScheme().get();
			mappedStartAddress =
				byteMappingScheme.getMappedSourceAddress(mappedRangeMinAddr, startOffset);
			mappedEndAddress =
				byteMappingScheme.getMappedSourceAddress(mappedRangeMinAddr, endOffset);
		}

		for (MemoryBlockDB b : getBlocks(mappedStartAddress, mappedEndAddress)) {
			Address minAddr = Address.min(b.getEnd(), mappedEndAddress);
			Address maxAddr = Address.max(b.getStart(), mappedStartAddress);
			checkMemoryWrite(b, minAddr, maxAddr.subtract(minAddr) + 1);
		}
	}
Returns the AddressMap from the program.

@return program address map
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/mem/MemoryMapDB.java