private void createData(Address start, Address end, DataType dataType, Program p,
			TaskMonitor monitor) throws CodeUnitInsertionException {

		Address nextAddr = start;
		Listing listing = p.getListing();
		listing.clearCodeUnits(start, end, false);

		int initialProgress = bytesApplied;

		int length = (int) end.subtract(nextAddr) + 1;
		while (nextAddr != null && nextAddr.compareTo(end) <= 0) {
			if (monitor.isCancelled()) {
				return;
			}

			Data d = listing.createData(nextAddr, dataType, length);
			int dataLength = d.getLength();
			bytesApplied = initialProgress + dataLength;

			try {
				nextAddr = nextAddr.addNoWrap(dataLength);
				length -= dataLength;
			}
			catch (AddressOverflowException e) {
				return;
			}

			monitor.setProgress(bytesApplied);
			if (++numDataCreated % 10000 == 0) {
				monitor.setMessage("Created " + numDataCreated);

				// Allow the Swing thread a chance to paint components that may require lock
				Swing.allowSwingToProcessEvents();
			}
		}
	}
This is the same as {@link #CreateDataBackgroundCmd(AddressSetView, DataType)} except that
it allows the caller to control whether or not a pointer data type is created when a 
non-pointer data type is applied at a location that previously contained a pointer data
type.
 
@param addrSet The address set to fill with the given dataType.
@param dataType the dataType to be applied to the address set.
@param stackPointers if true simple pointer conversion is enabled 
(see {@link DataUtilities#reconcileAppliedDataType(DataType, DataType, boolean)}).
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/data/CreateDataBackgroundCmd.java