protected void writeDown(PcodeTraceDataAccess into) {
			if (space.isUniqueSpace()) {
				return;
			}
			byte[] data = new byte[4096];
			ByteBuffer buf = ByteBuffer.wrap(data);
			for (AddressRange range : written) {
				long lower = range.getMinAddress().getOffset();
				long fullLen = range.getLength();
				while (fullLen > 0) {
					int len = MathUtilities.unsignedMin(data.length, fullLen);
					bytes.getData(lower, data, 0, len);
					buf.position(0);
					buf.limit(len);
					into.putBytes(space.getAddress(lower), buf);

					lower += len;
					fullLen -= len;
				}
			}
		}
A state piece which reads bytes from a trace, but caches writes internally.

<p>
This provides for "read-only" emulation on a trace. Writes do not affect the source trace, but
rather are cached in this state. If desired, those cached writes can be written back out at a
later time.
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/pcode/exec/trace/BytesTracePcodeExecutorStatePiece.java