private String createPointerString(Program program, Address codeUnitAddress) {
		int pointerSize = program.getDefaultPointerSize();
		long offset = 0;
		Memory memory = program.getMemory();
		try {
			switch (pointerSize) {
				case 4:
					int addrInt = memory.getInt(codeUnitAddress);
					offset = (addrInt & 0xffffffffL);
					offset *= codeUnitAddress.getAddressSpace().getAddressableUnitSize();
					break;
				case 8:
					offset = memory.getLong(codeUnitAddress);
					break;
				default:
					return null;
			}

			if (offset != 0) {
				Address potentialAddr = codeUnitAddress.getNewAddress(offset);
				if (memory.contains(potentialAddr)) {
					return "?  ->  " + potentialAddr.toString();
				}
			}
		}
		catch (MemoryAccessException | AddressOutOfBoundsException e) {
			// handled below
		}

		return null;
	}
Returns the number of comments that can be added before reaching the maximum number of
comments
@return the number of comments
Ghidra/Features/Base/src/main/java/ghidra/app/util/EolComments.java