AnyPS5/core/libs/prx/libkernel/DirectMemory
screamm 3b7ac1596d fix(libkernel): create the JIT shared memory backing in one call
Review of #3787 asked for no retries after an error in Jit.cpp.

Linux: memfd_create is called once with MFD_CLOEXEC. MFD_EXEC was
tried first and dropped on EINVAL; the flag only sets the file's execute
permission bits (Linux 6.3 and later), not whether the object maps
PROT_EXEC, which is decided by the mapping protection, as for the direct
memory memfd in DirectMemory.cpp. A one-shot choice from the headers
would fail on older kernels, so the flag is dropped; TechnicalDebt
records it.

Windows: the delete-on-close backing file is named from the process id,
a process-wide atomic counter and the performance counter, so CREATE_NEW
cannot meet an existing name, and any CreateFileW failure throws with
the Win32 error instead of looping up to 64 times on ERROR_FILE_EXISTS.
The descriptor stays a CRT descriptor on the file, so close, dup and
dup2 keep working as before.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 21:59:19 +02:00
..
DirectMemory.cpp feat(libkernel): implement the JIT shared memory calls 2026-10-12 21:59:19 +02:00
DirectMemory.hpp feat(libkernel): implement the JIT shared memory calls 2026-10-12 21:59:19 +02:00
Export.cpp feat(libkernel): implement sceKernelEnableDmemAliasing 2026-10-12 02:40:10 -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): report the largest free direct memory block from sceKernelAvailableDirectMemorySize 2026-10-11 00:58:28 +02: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 fix(libkernel): keep shared-memory identity and guest permissions consistent 2026-10-11 23:40:46 +02:00