public static int getThresholdRunOfValidPointers(Program program, long oneInNumberOfCases) {
		// find the valid blocks
		MemoryBlock[] blocks = program.getMemory().getBlocks();
		double byteCount = 0;
		for (MemoryBlock memoryBlock : blocks) {
			if (memoryBlock.getStart().getAddressSpace().isOverlaySpace()) {
				continue;
			}
			byteCount += memoryBlock.getSize();
		}

		// get the size of the space
		double bitSize =
			program.getLanguage().getDefaultCompilerSpec().getDataOrganization().getPointerSize() *
				8;
		double byteSize = Math.ceil(Math.pow(2.0, bitSize));

		if (byteCount >= byteSize) {
			return TOO_MANY_ENTRIES;  // Need many in a row!
		}

		double threshold = 1.0 / (oneInNumberOfCases);  // 1 in a billion chance

		// calculate the number of items needed in a row
		double numberInRowNeeded = Math.ceil(Math.log(threshold) / Math.log(byteCount / byteSize));

		return (int) numberInRowNeeded;
	}
@param program to check
@param oneInNumberOfCases 1 in this number of cases
@return the number of valid runs of pointers to achieve a ( 1 in
        numberOfCases)
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/disassembler/AddressTable.java