AnyPS5/core/libs/prx/libkernel/DirectMemory
Jan Šlégl 1078608783 feat(libkernel): implement munlock beside mlock
sceKernelMunlock and the POSIX munlock unlock the page-rounded range with
FreeBSD's results: 0 for a mapped range whether or not it is locked, EINVAL
for a range that wraps around zero, ENOMEM for an unmapped range. On Linux
the host munlock gives them. On Windows a reserved placeholder counts as
mapped only while the guest reservation or protection registry covers it,
and a region VirtualUnlock refuses as not fully locked is unlocked page by
page, as VirtualUnlock is all-or-nothing. sceKernelMlock shares the range
rounding.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GLfKH7Sqe51wX254k1XsV
2026-10-09 15:14:57 +02:00
..
DirectMemory.cpp fix(libkernel): replace partly overlapped allocations with a fixed mapping 2026-10-07 20:31:08 -04:00
DirectMemory.hpp feat(kernel): apply the memory type in sceKernelMtypeprotect 2026-10-06 14:32:47 +02:00
Export.cpp feat(libkernel): implement munlock beside mlock 2026-10-09 15:14:57 +02:00
MemoryPool.cpp feat(kernel): apply the memory type in sceKernelMtypeprotect 2026-10-06 14:32:47 +02:00
MemoryPool.hpp fix(libkernel): correct the MemoryPool.hpp include guard 2026-10-06 14:57:51 +02:00
MemoryPoolExport.cpp fix(libkernel): honour MAP_FIXED in sceKernelReserveVirtualRange and sceKernelMemoryPoolReserve 2026-10-01 00:00:22 +02:00
PosixMemory.cpp feat(libkernel): implement munlock beside mlock 2026-10-09 15:14:57 +02:00