@Override
	public DBTraceMemoryRegion addRegion(String path, Lifespan lifespan,
			AddressRange range, Collection<TraceMemoryFlag> flags)
			throws TraceOverlappedRegionException, DuplicateNameException {
		try (LockHold hold = LockHold.lock(lock.writeLock())) {
			Collection<? extends DBTraceMemoryRegion> conflicts =
				getRegionsIntersecting(lifespan, range);
			if (!conflicts.isEmpty()) {
				throw new TraceOverlappedRegionException(conflicts);
			}
			if (!manager.getRegionsWithPathInLifespan(lifespan, path).isEmpty()) {
				throw new DuplicateNameException(
					"A region having path '" + path +
						"' already exists within an overlapping snap");
			}
			DBTraceMemoryRegion region =
				regionMapSpace.put(new ImmutableTraceAddressSnapRange(range, lifespan), null);
			region.set(path, path, flags);
			trace.updateViewsAddRegionBlock(region);
			trace.setChanged(new TraceChangeRecord<>(TraceEvents.REGION_ADDED, this, region));
			return region;
		}
	}
Implements {@link TraceMemorySpace} using a database-backed copy-on-write store.
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/memory/DBTraceMemorySpace.java