AnyPS5/core
Jan Šlégl e753080391 fix(libkernel): count guest module segments against the flexible memory budget
sceKernelAvailableFlexibleMemorySize and the flexible maps counted only
explicit flexible mappings, so the full 448 MiB was reported while the
title's executable and modules were loaded. A title that derives its code
and data size from the budget minus the available size got an unsigned
underflow.

The segments of the main executable and of every .guest.prx module that
the title's ELF gives permissions now count, rounded to 16 KiB pages, as
shadPS4 maps every non-system module segment as flexible memory. The
relinker's own blocks and the host system libraries do not count. The
charge ends when a module is unloaded.

Refs #2883

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fnrk5Dazjb2tLooVSpdRQq
2026-10-11 17:48:05 +02:00
..
Decoder fix(png): bound transparency chunk detection to the input 2026-10-10 09:28:30 +08:00
libs fix(libkernel): count guest module segments against the flexible memory budget 2026-10-11 17:48:05 +02:00
relinker Merge pull request #3495 from Lorkydey/fix/relinker-registry-input-preservation 2026-10-11 13:56:53 +02:00
shader/recompiler Merge pull request #3441 from MarcZX100/codex/fold-unordered-infinity-compares-3355 2026-10-11 13:55:17 +02:00