private void initializeBlock(MemoryBlock block) {

		NumberInputDialog dialog = new NumberInputDialog("Initialize Memory Block",
			"Enter fill byte value for block: ", 0, 0, 255, true);

		if (!dialog.show()) {
			return;	// cancelled
		}

		byte value = (byte) dialog.getValue();

		int id = program.startTransaction("Initialize Memory Block");
		try {
			Memory mem = program.getMemory();
			int index = memList.indexOf(block);
			MemoryBlock newBlock = mem.convertToInitialized(block, value);
			memList.set(index, newBlock);
			program.endTransaction(id, true);
		}
		catch (Throwable t) {
			program.endTransaction(id, false);
			String msg = ExceptionUtils.getMessage(t);
			Msg.showError(this, provider.getComponent(), "Block Initialization Failed", msg, t);
		}
	}
Create a new initialized block based on the given uninitialized block.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/memory/MemoryMapModel.java