private AddressSet getMemoryBlockAddresses(MemoryBlock[] blocks) {

		AddressSet addresses = new AddressSet();
		for (MemoryBlock memBlock : blocks) {
			if (!memBlock.isLoaded()) {
				continue;
			}
			if (memBlock.isWrite() || memBlock.isRead() || memBlock.isExecute()) {
				addresses = addresses.union(new AddressSet(memBlock.getStart(), memBlock.getEnd()));
			}
		}
		return addresses;
	}
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