mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-06 13:30:00 +00:00
A per-thread collect memo hit read the tracker generation without the tracker mutex. A walk running on another thread bumps the generation before it stamps the blocks it finds written, so the hit could return a value that walk then stamps blocks with; a caller that recorded it as its verified generation trusts those blocks in every later UnchangedSince and never refreshes them. The tracker now publishes the generation each time an update releases its mutex (TrackerLock), after every stamp of that update is in place, and a memo hit returns the published value. MarkWritten's release around beforeUnwatch does not publish, since it stamps again after relocking. The per-epoch collect map hit returns the published value too. Completed MarkWritten bumps are still seen at once; a value older than the live one only makes a check fail and refresh. agc_collect_memo_generation links GuestMemory against a fake write watch that holds a walk after its generation bump, takes a memo hit on another thread meanwhile, and checks the write the walk then stamps is not trusted against the generation the hit returned.