@Override
		public boolean applyTo(Program program) {

			Memory memory = program.getMemory();

			if (!program.hasExclusiveAccess()) {
				msg = "Exclusive access required";
				return false;
			}

			try {
				memory.split(block, newStart);
			}
			catch (MemoryBlockException e) {
				msg = e.getMessage();
				return false;
			}
			catch (IllegalArgumentException e) {
				msg = e.getMessage();
				return false;
			}
			catch (NotFoundException e) {
				msg = e.getMessage();
				return false;
			}
			catch (LockException e) {
				msg = e.getMessage();
				return false;
			}
			MemoryBlock newBlock = memory.getBlock(newStart);
			try {
				newBlock.setName(newBlockName);
			}
			catch (LockException e) {
				msg = e.getMessage();
				return false;
			}
			return true;
		}
Delete the list of memory blocks.
@param blocks list of memory blocks to be removed
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/memory/MemoryMapManager.java