private int getValidPageSize(AddressSpace space) {
		int ps = 256;	// Minimum page size supported
		long spaceSize = space.getMaxAddress().getOffset() + 1;	// Number of bytes in the space (0 if 2^64 bytes)
		if ((spaceSize & 0xff) != 0) {
			Msg.warn(this, "Emulator using page size of 256 bytes for " + space.getName() +
				" which is NOT a multiple of 256");
			return ps;
		}
		spaceSize >>>= 8;	// Divide required size by 256 (evenly)
		while (ps < pageSize) {	// If current page size is smaller than preferred page size
			if ((spaceSize & 1) != 0) {
				break;			// a bigger page size does not divide the space size evenly, so use current size
			}
			ps <<= 1;	// Bump up current page size to next power of 2
			spaceSize >>>= 1;	// Divide (evenly) by 2
		}

		return ps;
	}
Get the page size to use with a specific AddressSpace. The page containers (MemoryBank)
assume page size is always power of 2. Any address space is assigned at least 8-bits of
addressable locations, so at the very least, the size is divisible by 256. Starting with this
minimum, this method finds the power of 2 that is closest to the preferred page size
(pageSize) but that still divides the size of the space.

@param space is the specific AddressSpace
@return the page size to use
Ghidra/Framework/Emulation/src/main/java/ghidra/app/emulator/DefaultEmulator.java