AnyPS5/core/libs/prx/libkernel
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
..
Aio/src fix(libkernel): preserve EINVAL in AIO completions 2026-10-10 08:42:19 +02:00
AppMetadata fix(kernel): skip the download0 mount when param.json cannot be read 2026-10-08 16:07:18 +02:00
Apr Merge pull request #2789 from tototomate123/fix/hfw-apr-split 2026-10-11 09:32:21 +02:00
DirectMemory fix(libkernel): count guest module segments against the flexible memory budget 2026-10-11 17:48:05 +02:00
Equeue fix(libkernel): report a level-triggered equeue event once per wait 2026-10-11 11:28:34 +00:00
EventFlag/src feat(runtime): timed waits, sync primitive fixes, heap and RTC fixes, unattended-run switches 2026-09-26 19:00:39 -07:00
File Merge pull request #3428 from MarcZX100/codex/fix-libkernel-open-empty-path-3308 2026-10-11 13:55:48 +02:00
Module fix(libkernel): count guest module segments against the flexible memory budget 2026-10-11 17:48:05 +02:00
Pthread Merge pull request #3484 from AchrafReyani/feat/libkernel-pthread-mutexattr-gettype 2026-10-11 13:53:23 +02:00
Semaphore fix(libkernel): accept a zero count in sceKernelSignalSema 2026-10-10 16:12:43 +00:00
Socket Merge pull request #3487 from DariusHQ/feat/libkernel-underscore-ioctl 2026-10-11 13:54:41 +02:00
SyncOnAddress/src fix(libkernel): throw on a size-0 _umtx_op timeout that is not a valid timespec 2026-10-11 11:13:33 +02:00
System feat(libkernel): implement sigsetjmp 2026-10-11 11:23:10 +00:00
Time fix(libkernel): let exception delivery interrupt timed mutex and rwlock waits on Windows 2026-10-11 11:20:40 +02:00
CMakeLists.txt fix(libkernel): count guest module segments against the flexible memory budget 2026-10-11 17:48:05 +02:00
KernelErrors.hpp refactor(kernel): share SCE kernel error codes through KernelErrors.hpp 2026-09-27 13:32:28 +07:00
Unimplemented.cpp feat(libkernel): implement thread cancellation 2026-10-10 11:32:09 +02:00