The conflict in core/libs/tests/GuestRudpContextLifecycle.cpp with #13799 keeps both changes: this branch's removal of the check that sceRudpActivate throws, and main's sceRudpBind(ctx, 5, 0, 2) call after it.
The check allocated three physical blocks and accepted whatever the allocator returned, so an ordinary run could coalesce them into one and never exercise a scattered result, and a layout where only the latter two are adjacent (two runs) failed its count. One four-page allocation mapped in the order 2,3,0,1 gives exactly two runs, with the latter mappings required to coalesce; the offsets, lengths, a partial-range query, the backing byte and the insufficient-capacity refusal are checked exactly.
Test patch by JJenkx (#4449 comment, deterministic-scattered-runs-linux-20261029).
Co-authored-by: JJenkx <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Conflicts: GuestArena.hpp/.cpp keep both sides' exports; GuestBufferMemory.cpp keeps this PR's run-list createBackingImport and resolves importStaysWatched's shared-backing check through the run resolver (sharedBacked), replacing main's BackingFile/sharedBacking; the debt file keeps this PR's sparse-import entry and main's presentation entry.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Mapping a direct memory range that includes an unallocated physical
page threw std::invalid_argument and ended the process. It now returns
ENOMEM before anything is mapped, as shadPS4's MemoryManager::MapMemory
does.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
KytyPS5 and shadPS4 return EFAULT for a null name. The test keeps that
and the rename and clear checks, and drops the null address, zero length
and past-the-end cases that no reference covers; the debt entry records
them as unknown, with the 32-byte name limit.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A guest mmap with PROT_EXEC and MAP_SHARED of a shared-memory object or a regular file threw on Windows. The section is now created from a handle reopened with GENERIC_EXECUTE, as PAGE_EXECUTE_READ or PAGE_EXECUTE_READWRITE, the owner ACE of named objects grants execute with read, and a writable shared mapping of a read-only descriptor fails with EACCES, as FreeBSD 11.4 shm_mmap and vn_mmap do.
Fixes#12337
A 900 byte block shrinking to 40 bytes and a 1 MiB block shrinking to 4 KiB have
to move and keep their data, while a 1 MiB block resized by 100 bytes stays put.
A 1000 byte block shrinks to 900, regrows to 1000 and is realigned to 800 at the
same address with the matching usable size and its data intact; growing it to
1 MiB moves it and keeps the data.
This reverts commit 780b33aea3, restoring the 13824 MiB direct memory pool.
With the pool at 12288 MiB, Astro Bot (PPSA21564) can no longer load its
level: DirectMemoryAllocator asserts "Can't allocate direct memory" for a
64 MB VideoPlayerTexture with 12228 of 12288 MB in use, then the process
faults about 26 s in (2 of 2 runs, RTX 4090, Linux, main cccdaa2734).
The same tree with only this merge reverted runs the full 150 s with no
direct memory assert (2 of 2 runs).
A resident direct memory mapping created a SharedPage, a Physical, a
physical map node and an aliases buffer for every 16 KiB page, about
18 MiB of heap per GiB mapped, although a page mapped once holds no
state there. Resident pages now keep only their View, with pins and the
compare-when-shared mark in it; an index from (section, offset) to the
resident run finds a live resident mapping of a physical page, and the
shared state is created when a run is demoted, or when it is evicted
with data or a compare mark. ForgetSection drops the index entries of
the section's runs.
guest_memory on Windows 11 26200 (Ryzen 5 5600X): private memory per
GiB mapped at map time drops from 30.9 MiB to 13.4 MiB.
Co-Authored-By: Claude <[email protected]>