@Override
	public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log)
			throws CancelledException {

		AddressFactory factory = program.getAddressFactory();
		AddressSpace[] addressSpaces = factory.getAddressSpaces();

		AddressSetView initializedMemory = program.getMemory().getLoadedAndInitializedAddressSet();

		try {

			NGramUtils.startNewSession(trigramFile, forceModelReload);

			isLowerCaseModel = NGramUtils.isLowerCaseModel();

			if (set == null) {
				set = new AddressSet(initializedMemory);
			}

			AddressSet searchSet = initializedMemory.intersect(set);

			if (searchOnlyAccessibleMemBlocks) {

				// Intersect current AddressSet with accessible memory blocks
				MemoryBlock[] blocks = program.getMemory().getBlocks();
				AddressSet memoryBlockAddresses = getMemoryBlockAddresses(blocks);
				searchSet = searchSet.intersect(memoryBlockAddresses);
			}

			for (AddressSpace space : addressSpaces) {

				monitor.checkCancelled();

				// Portion of current address space that intersects with initialized memory
				AddressSet intersecting =
					searchSet.intersectRange(space.getMinAddress(), space.getMaxAddress());

				// Initialize, because we don't want to use the same iterators or
				// code units when we change address spaces
				instructionIterator = null;
				definedDataIterator = null;
				currInstrCU = null;
				currDataCU = null;

				findStrings(program, intersecting, minStringLength, startAlignment, requireNullEnd,
					allCharWidths, monitor);
			}
		}
		catch (CancelledException e) {
			throw e;
		}
		catch (IOException e) {
			String msg =
				"Error accessing string model file: " + trigramFile + ": " + e.getMessage();
			log.appendMsg(msg);
			log.setStatus(msg);
			return false;
		}
		catch (Exception e) {
			Msg.error(this, "Unexpected exception during string analysis", e);
			log.setStatus("Unexpected exception during string analysis (see console)");
			return false;
		}

		return true;
	}
Set the parameter that determines whether to search for strings in all memory blocks, or
in blocks where at least one of the R, W, or X permissions are set.
 
@param b  true to only search accessible memory blocks, false to search all memory blocks
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/string/StringsAnalyzer.java