private int getPaddingLength(Address address, int length) {
		if (!addAlignmentBytes || length % alignment == 0) {
			return 0;
		}

		int padLength = alignment - (length % alignment);

		try {
			byte[] bytes = new byte[padLength];
			int num = program.getMemory().getBytes(address.add(length), bytes, 0, padLength);
			if (num != padLength) {
				return 0;
			}
			for (int i = 0; i < padLength; i++) {
				if (bytes[i] != 0) {
					return 0;
				}
			}
			return padLength;
		}
		catch (MemoryAccessException e1) {
			return 0;
		}
	}
Creates an analysis (not user defined) type of label with the specified name at the
program's address.
@param addr the address
@param label the name for the label
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/string/MakeStringsTask.java