private void processDyldCacheMemoryBlocks(DyldCacheHeader dyldCacheHeader, String name,
			ByteProvider bp) throws Exception {
		List<DyldCacheMappingInfo> mappingInfos = dyldCacheHeader.getMappingInfos();
		monitor.setMessage("Processing DYLD mapped memory blocks...");
		monitor.initialize(mappingInfos.size());
		String extension = name.contains(".") ? name.substring(name.indexOf(".")) : "";
		FileBytes fb = MemoryBlockUtils.createFileBytes(program, bp, monitor);
		long endOfMappedOffset = 0;
		boolean bookmarkSet = false;
		for (DyldCacheMappingInfo mappingInfo : mappingInfos) {
			long offset = mappingInfo.getFileOffset();
			long size = mappingInfo.getSize();
			MemoryBlock block = MemoryBlockUtils.createInitializedBlock(program, false,
				"DYLD" + extension, space.getAddress(mappingInfo.getAddress()), fb, offset, size,
				"", "", mappingInfo.isRead(), mappingInfo.isWrite(), mappingInfo.isExecute(), log);

			if (offset + size > endOfMappedOffset) {
				endOfMappedOffset = offset + size;
			}

			if (!bookmarkSet) {
				program.getBookmarkManager()
						.setBookmark(block.getStart(), BookmarkType.INFO, "Dyld Cache Header",
							name + " - " +
								NumericUtilities.convertBytesToString(dyldCacheHeader.getUUID()));
				bookmarkSet = true;
			}

			monitor.checkCancelled();
			monitor.incrementProgress(1);
		}

		if (endOfMappedOffset < bp.length()) {
			monitor.setMessage("Processing DYLD unmapped memory block...");
			MemoryBlock fileBlock =
				MemoryBlockUtils.createInitializedBlock(program, true, "FILE" + extension,
				AddressSpace.OTHER_SPACE.getAddress(endOfMappedOffset), fb, endOfMappedOffset,
				bp.length() - endOfMappedOffset, "Useful bytes that don't get mapped into memory",
				"", false, false, false, log);
			dyldCacheHeader.setFileBlock(fileBlock);
		}
	}
Processes the DYLD Cache's memory mappings and creates memory blocks for them.

@param dyldCacheHeader The {@link DyldCacheHeader}
@param name The name of the DYLD Cache
@param bp The corresponding {@link ByteProvider}
@throws Exception if there was a problem creating the memory blocks
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/DyldCacheProgramBuilder.java