@Override
	public List<SearchResult<Address, T>> search(Memory memory, AddressSetView view,
			TaskMonitor monitor) throws MemoryAccessException, CancelledException {
		AddressSetView initView = memory.getLoadedAndInitializedAddressSet().intersect(view);
		monitor.initialize(numberOfNodes() + initView.getNumAddresses());

		fixupSuffixPointers(monitor);
		ArrayList<SearchResult<Address, T>> results = new ArrayList<SearchResult<Address, T>>();
		byte[] buffer = new byte[BUFFER_SIZE];

		AddressRangeIterator addressRanges = initView.getAddressRanges(true);
		while (addressRanges.hasNext()) {
			AddressRange range = addressRanges.next();
			BigInteger rangeLength = range.getBigLength();
			int fetchSize = BUFFER_SIZE;
			if (rangeLength.compareTo(BigInteger.valueOf(BUFFER_SIZE)) < 0) {
				fetchSize = rangeLength.intValue();
			}
			ByteTrieNode<T> ptr = root;
			Address address = range.getMinAddress();
			while (range.contains(address)) {
				monitor.checkCancelled();
				final int bytesRead = memory.getBytes(address, buffer, 0, fetchSize);
				monitor.incrementProgress(bytesRead);

				int index = 0;
				while (index < bytesRead) {
					ByteTrieNode<T> trans = null;
					while (trans == null) {
						trans = getTransition(ptr, buffer[index]);
						if (ptr == root) {
							break;
						}
						if (trans == null) {
							ptr = ptr.suffix;
						}
					}
					if (trans != null) {
						ptr = trans;
					}
					ByteTrieNode<T> tmp = ptr;
					while (tmp != root) {
						if (tmp.isTerminal()) {
							int offset = index - tmp.length() + 1;
							Address position = address.add(offset);
							results.add(new SearchResult<Address, T>(tmp, position, tmp.getItem()));
						}
						tmp = tmp.suffix;
					}
					++index;
				}

				try {
					address = address.add(bytesRead);
				}
				catch (AddressOutOfBoundsException e) {
					break; // hit end of address space
				}
			}
		}

		return results;
	}
Search memory using the Aho-Corasick multiple string
trie search algorithm.
@param memory the program memory manager
@param view the address set view to search
@param monitor a task monitor
@return a list of search results
@throws MemoryAccessException if bytes are not available
@throws CancelledException if the user cancels
Ghidra/Features/Base/src/main/java/ghidra/util/search/trie/ByteTrie.java