private boolean isUndefinedInRange(Program program, Address start, Address end) {

		InstructionIterator instructions = program.getListing().getInstructions(start, true);
		if (instructions.hasNext()) {
			Instruction instr = instructions.next();
			if (instr.getMinAddress().compareTo(end) <= 0) {
				return false;
			}
		}

		DataIterator definedData = program.getListing().getDefinedData(start, true);
		while (definedData.hasNext()) {
			Data data = definedData.next();
			if (data.getMinAddress().compareTo(end) > 0) {
				break;
			}
			if (!Undefined.isUndefined(data.getDataType()) &&
				!(data.getDataType() instanceof Pointer)) {//ok if pointer is already applied
				return false;
			}
		}

		return true;
	}
Creates pointers from start address.
If a pointer already exists, then skip it and continue.
Ghidra/Features/Base/src/main/java/ghidra/app/util/demangler/DemangledAddressTable.java