mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
WindowsMappings keys each physical page's state (moved into the section, saved bytes of an unmapped resident page) by the section handle value. sceKernelReleaseDirectMemory frees the backing before it unmaps the views, so ForgetSection ran while those views still existed and kept their slots. After the views went, the slots stayed under a handle value that Windows hands out again, and the next direct allocation whose section got that value started with the old page state: its first mapping went to the section instead of private memory, or received the old allocation's bytes. Views now share ownership of their slot, ForgetSection drops every slot of the section at once, and JIT shared memory forgets its section before closing it too.