AnyPS5/core/libs/prx/libkernel/DirectMemory
DotDebian d9852df2a2 fix(libc): track writes to singly mapped direct memory without faults on Windows
A direct memory page mapped at one guest address now lives in private
MEM_WRITE_WATCH memory at that address, and its writes are collected with
GetWriteWatch like flexible memory: no fault is raised. A page mapped at a
second address moves its whole resident run into the section, behind a
read-only fence while it is copied, and every address becomes a view of it,
tracked by write protection. Unmapped resident pages that are not blank are
kept in a private reservation until they are mapped again, not in the
section.

Ported onto main's 4 KiB subpage tracking of shared views: resident runs
keep a per-page collected bit and enter the fresh ranges, so Fresh and
Armed collections select them like shared views; a demoted run carries its
collected bits into the views and reports every page once. MapAlias throws
through refuse() when a resident run extends outside the aliased range, and
the caller keeps main's fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1W4jdNSKTV7xwuS6xQPJV
2026-10-14 02:39:10 +02:00
..
DirectMemory.cpp fix(libc): track writes to singly mapped direct memory without faults on Windows 2026-10-14 02:39:10 +02:00
DirectMemory.hpp feat(libkernel): implement the JIT shared memory calls 2026-10-12 21:59:19 +02:00
Export.cpp fix(kernel): honor the declared flexible memory budget 2026-10-13 20:13:14 -03:00
Jit.cpp fix(libkernel): create the JIT shared memory backing in one call 2026-10-12 21:59:19 +02:00
MemoryPool.cpp fix(libkernel): harden DirectMemory pool bounds and rollback 2026-10-13 10:49:27 +00:00
MemoryPool.hpp fix(libkernel): correct the MemoryPool.hpp include guard 2026-10-06 14:57:51 +02:00
MemoryPoolExport.cpp fix(libkernel): forward entry type in sceKernelMemoryPoolBatch op 1 2026-10-12 11:31:52 +05:30
PosixMemory.cpp feat(libkernel): add mlockall 2026-10-13 07:51:35 +00:00