public static AddressSet getAddressSet(Program program, boolean blocksWithBytes) {
		MemoryBlock[] memBlocks = ProgramMemoryUtil.getMemBlocks(program, blocksWithBytes);
		AddressSet addrSet = new AddressSet();
		for (MemoryBlock block : memBlocks) {
			addrSet.add(block.getStart(), block.getEnd());
		}
		return addrSet;
	}
Gets a new address set indicating all addresses of the indicated 
memory type in the specified program.
@param program the program whose address set we want.
@param blocksWithBytes if true, include memory blocks that have their own bytes.
@return the memory's address set of the indicated type.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMemoryUtil.java