private void createReference(Data data, Address toAddr, List<Address> longSegmentAddressList) {
		if (toAddr == null || !toAddr.isLoadedMemoryAddress()) {
			return;
		}

		long offset = toAddr.getOffset();
		if (offset == 0 || offset == toAddr.getAddressSpace().getMaxAddress().getOffset()) {
			return; // treat 0 and all f's as uninitialized pointer value
		}

		// for 64 bit programs, make sure we are not creating pointers on random bytes which would
		// pollute our 32 bit segment map and make Ghidra run poorly.
		if (toAddr.getAddressSpace().getSize() > 32) {
			if (exceedsLimitOn64BitAddressSegments(longSegmentAddressList, toAddr)) {
				return; // don't add the reference - probably garbage
			}
		}

		DataType dataType = data.getDataType();
		if (dataType instanceof TypeDef) {
			// Check for pointer-typedef with component offset setting
			long pointerComponentOffset =
				PointerTypedefInspector.getPointerComponentOffset((TypeDef) dataType);
			if (pointerComponentOffset != 0) {
				refManager.addOffsetMemReference(data.getMinAddress(),
					toAddr.subtractWrap(pointerComponentOffset), true, pointerComponentOffset,
					RefType.DATA, SourceType.DEFAULT, 0);
				return;
			}
		}

		refManager.addMemoryReference(data.getMinAddress(), toAddr, RefType.DATA,
			SourceType.DEFAULT, 0);
	}
Add in any references from pointer data types found in a data item.  We don't create refs 
for 0 or all f's.
@param data the data to add references for.
@param longSegmentAddressList used internally to make sure that, for 64 bit addresses, we
don't pollute the addressMap segment table when creating arrays of pointers on arbitrary
data.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/CodeManager.java