private void computeLength() {
		// NOTE: Data intentionally does not use aligned-length
		length = dataType.getLength();

		// undefined will never change their size
		if (dataType instanceof Undefined) {
			return;
		}

		if (length < 1) {
			length = codeMgr.getLength(address);
		}
		if (length <= 0) {
			length = 1;
		}

		// no need to do all that follow on checking when length == 1
		if (length == 1) {
			return;
		}

		// FIXME Trying to get Data to display for External.
		if (address.isExternalAddress()) { // FIXME
			return; // FIXME
		} // FIXME

		Memory mem = program.getMemory();
		Address endAddress = null;
		boolean noEndAddr = false;
		try {
			endAddress = address.addNoWrap(length - 1);
		}
		catch (AddressOverflowException ex) {
			noEndAddr = true;
		}

		if (noEndAddr || (!mem.contains(address, endAddress))) {
			MemoryBlock block = mem.getBlock(address);
			if (block != null) {
				endAddress = block.getEnd();
				length = (int) endAddress.subtract(address) + 1;
			}
			else {
				length = 1; // ?? what should this be?
			}
		}

		// if this is not a component where the size could change and
		// the length restricted by the following instruction/data item, assume
		// the createData method stopped fixed code units that won't fit from being added
		//
		// TODO: If the data organization for a program changes, for example a long was 32-bits
		//       and is changed to 64-bits, that could cause an issue.
		//       If the data organization changing could be detected, this could be done.
		//
		// if (!(baseDataType instanceof Composite || baseDataType instanceof ArrayDataType)) {
		//	return;
		// }

		// This is potentially expensive! So only do if necessary
		// see if the datatype length is restricted by a following codeunit
		Address nextAddr = codeMgr.getDefinedAddressAfter(address);
		if ((nextAddr != null) && nextAddr.compareTo(endAddress) <= 0) {
			length = (int) nextAddr.subtract(address);
		}
	}
Database implementation for the Data interface.

NOTE!! DataComponents only have a unique key within its parent Struct/Array.  This places a constraint on
the use of the key field and getKey() method on the underlying classes CodeUnitDB and DataDB.
The CodeUnit key should only be used for managing an object cache.  The addr field should be used within
this class instead of the key field which represents an "index in parent" for data components which are
cached separately.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/DataDB.java