private Page ensurePageCached(Address address, int len) throws MemoryAccessException {
		int chosen = choosePage(address, len);
		if (chosen == -1) {
			pages[pageCount - 1].load(address, len);
			chosen = pageCount - 1;
		}
		if (chosen == 0) {
			return pages[0];
		}
		synchronized (pages) {
			Page temp = pages[chosen];
			pages[chosen] = pages[0];
			pages[0] = temp;
			return temp;
		}
	}
Ensure a page is cached

@param address the start address of the page
@param len the minimum number of bytes required from the page
@return the chosen cache page
@throws MemoryAccessException if the required bytes cannot be read
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/program/ByteCache.java