private void alignComposite(int preferredSize, boolean packingDisabled) {

		Composite composite = (Composite) memberDataType;

		// don't attempt to align empty composite - don't complain
		if (isStructureContainer()) {
			if (structureMemberOffsetMap.isEmpty()) {
				return;
			}
		}
		else if (unionMemberList.isEmpty()) {
			return;
		}

		// Try to get unions to get to the preferred size by adding a padding member
		if (composite instanceof Union && preferredSize > composite.getAlignedLength()) {
			ArrayDataType padding = new ArrayDataType(CharDataType.dataType, preferredSize);
			composite.add(padding, PADDING_COMPONENT_NAME, "");
		}

		if (packingDisabled) {
			if (composite instanceof Structure) {
				removeAllPadding(composite); // includes bit-field padding
			}
			setComputedAlignment(composite);
			return;
		}

		Composite copy = (Composite) composite.copy(dataTypeManager);

		int pack = 0;
		copy.setToDefaultPacking();

		boolean alignOK = isGoodAlignment(copy, preferredSize);
		if (alignOK) {
			composite.setToDefaultPacking();
			if (hasStructurePadding) {
				removeUnnecessaryPadding(composite);
			}
		}
		else if (composite instanceof Structure) {
			if (preferredSize > 0 && copy.getLength() != preferredSize) {
				copy.setToMachineAligned(); // will only impact structure length
				alignOK = isGoodAlignment(copy, preferredSize);
				if (alignOK) {
					composite.setToDefaultPacking();
					composite.setToMachineAligned();
					if (hasStructurePadding) {
						removeUnnecessaryPadding(composite);
					}
				}
				else {
					copy.setToDefaultAligned(); // restore default alignment
				}
			}
			if (!alignOK) {
				removeAllPadding(composite); // includes bit-field padding
				if (!hasStructurePadding) {
					pack = 1;
					copy.setExplicitPackingValue(pack);
					alignOK = isGoodAlignment(copy, preferredSize);
					if (alignOK) {
						composite.setExplicitPackingValue(pack);
					}
				}
			}
		}
		// Unions fall through to here
		if (!alignOK) {
			setComputedAlignment(composite);
		}
		// Don't complain about Class structs which always fail... this might always be true
		//  for the MSDIA analyzer, but we hope classes will align better with PDB Universal in
		//  the future
		if (!alignOK && errorConsumer != null && !isClass) {
			String anonymousStr = parent != null ? " anonymous " : "";
			errorConsumer.accept("PDB " + anonymousStr + memberType +
				" reconstruction failed to align " + composite.getPathName());
		}
	}
Align container composite data type if possible.
@param preferredSize preferred size of composite if known, else <= 0 if unknown
@param packingDisabled {@code true} to disable any attempted use of packing on this
composite or any of its generated composite dependencies
Ghidra/Features/PDB/src/main/java/ghidra/app/util/bin/format/pdb/DefaultCompositeMember.java