AnyPS5/core/libs/prx/libc/include
jeffrey12cali e4e0702946 fix(guest-arena): place guest address space in the PS5 window on Linux
The arena constructor was Windows-only, so on Linux Available() was false: the guest heap fell back to the host allocator and direct memory landed wherever the kernel pleased. Titles that require a low virtual address rejected the mapping and re-issued the identical request, which surfaced as a start-up assert inside their own allocator.

Seed the window from the mappings that already exist instead of reserving it up front, because a PROT_NONE reservation of the whole range starves the kernel's own top-down mmap, which picks addresses just below the stack inside that range. Commit, reset and set-protection become portable so the arena owns its used ranges on both platforms, and fixed mappings are checked against the arena's used ranges rather than against EEXIST from a reservation.

The window-placement and no-overwrite checks in guest_memory were compiled only for Windows; they now run on Linux too, and the window check fails without this change.

Fixes #692
2026-10-10 22:56:07 +13:00
..
exceptions fix(libc): export the C personality to guest code 2026-10-08 13:16:41 +03:00
general fix(libc): define APS5_LOG_OUT_DEBUG when APS5_DEBUG_LOG is set 2026-10-09 13:42:51 +02:00
specifics Merge pull request #1435 from ewraj/fix/linux-guest-varargs 2026-10-08 15:52:17 +02:00
ApplicationHeap.hpp feat(libc): implement malloc_stats_fast through the application allocator 2026-10-09 11:04:45 +05:30
CpuTopology.hpp perf(agc): pin the queue workers to the performance cores on Linux 2026-10-05 21:23:34 +13:00
FileStream.hpp fix(libc): open fopen and freopen paths through the wide CRT on Windows 2026-10-10 21:23:30 +13:00
FilesystemError.hpp refactor(libkernel): share one rename implementation with libc 2026-10-08 23:17:04 +02:00
General.hpp fix(libc): stop the strtol family at a binary prefix on Linux 2026-10-09 21:26:13 +00:00
GuestAllocations.hpp fix(agc): address-based builds map only memory mapped for the GPU 2026-10-10 14:34:34 +05:30
GuestArena.hpp fix(guest-arena): place guest address space in the PS5 window on Linux 2026-10-10 22:56:07 +13:00
GuestDirectory.hpp feat(libc): translate guest directory enumeration 2026-09-25 06:41:55 +10:00
GuestHeap.hpp feat(libc): implement RaiseEv, catchReturnFromMain and reallocalign 2026-09-30 23:55:00 +00:00
GuestLocale.hpp feat(libc): implement collate<char>::_Getcat 2026-10-06 14:53:47 +02:00
GuestTime.hpp fix(libc): convert times into the guest's 56-byte tm on Windows 2026-10-10 02:13:17 +02:00
GuestWriteWatch.hpp fix(agc): host imports write-protect only pages a collect already protects 2026-10-10 11:38:28 +05:30
HeapDiagnostics.hpp feat(libc): implement heap trace info 2026-09-27 11:43:36 +03:00
HostThreadLocal.hpp fix(agc): preserve recorder buffers through Windows thread teardown 2026-09-28 09:55:01 +10:00
PreciseWait.hpp fix(audio): pace blocking audio calls with a high-resolution timer 2026-10-10 01:31:57 +02:00
Shutdown.hpp fix(libc): end the process without detach routines in _Exit on Windows 2026-10-10 21:20:29 +13:00
WindowsFormatting.hpp fix(libc): format guest wide printf arguments on Linux 2026-10-08 21:15:04 +02:00
WindowsMappings.hpp fix(libc): check a whole range before collecting its writes with reset 2026-10-09 10:36:55 -05:00
WindowsScanning.hpp fix(libc): translate Windows fscanf guest arguments 2026-10-06 13:45:10 -07:00