feat(libSceJemspace): implement arena allocation and statistics #9855

Open
kyon-eth wants to merge 27 commits from upstream-pr/9855 into main
kyon-eth commented 2026-10-22 19:03:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by kyon-eth on 2026-10-22T19:03:04Z.


What

Draft follow-up to #9452. Current main integrated: c2c852d0ec3.

Implement all 13 discovered libSceJemspace exports: arena lifecycle, allocation/reallocation, usable size, statistics snapshots, purge and callback reports. Preserve allocation ownership, per-arena limits, failure outputs and the observed size/alignment rules.

Build pinned public jemalloc 5.2.0 directly with CMake from its Git submodule. Configure headers with compiler feature/type probes and generate private-symbol mappings with the compiler toolchain's nm. Replace its page layer with guest kernel mappings and implement the module's extent accounting. Keep allocator internals hidden from NID exports and package its license. No Autoconf, Bash, external Make build, CI tool installation or conventions-checker exception is required.

Contracts were inspected at 0x51cb0–0x526ce and the page layer at 0x3a470–0x3a75b. The firmware version is unverified. Both newly resolved names reproduce their NIDs: sceJemspacePurge = s686MsLMwns, sceJemspacePrintStats = 4aop4GKLZaA.

The inspected allocator identifies thirteen further commits unavailable upstream. Matching the exercised contracts does not establish equivalence for that entire delta. Reports intentionally describe the public backend. Remaining uncertainties are recorded in docs/dev/debt/libSceJemspace.md.

Tested

Current-main validation (2026-10-30): merged main c2c852d0ec3, retaining main's release-packaging changes. Both registered macOS x86-64 allocator/statistics tests pass (2/2). Conventions, whitespace and privacy checks pass. No allocator behavior was changed by this integration, and no new Linux/Windows execution or game result is claimed.

C-standard follow-up: libSceJemspace now requires C11, matching the allocator and symbol-probe targets. Reproduced the reported ATOMIC_VAR_INIT failure in GuestPages.c on macOS/Clang with -DCMAKE_C_STANDARD=23. With the target property added and that global setting retained, the generated compile command uses -std=gnu11 and both registered Jemspace tests pass. The ordinary x86_64/Rosetta configuration also builds and passes both tests. These runs use the boundary composition documented below.

The independent Windows 11 / WinLibs GCC 15.2 report verified the preceding head with a global C11 workaround: both registered tests passed against the real Windows libc/libkernel, including combined unmap, guard preservation and range reuse. This target-local fix removes the need for that global workaround; Windows execution of this new commit still needs CI confirmation.

Review follow-up: probe the strerror_r return type under _GNU_SOURCE with compiler warnings treated as errors, matching jemalloc's upstream detection. Define JEMALLOC_STRERROR_R_RETURNS_CHAR_WITH_GNU_SOURCE only when that probe succeeds. macOS retains its POSIX/int path; glibc/GNU compilation still needs the maintainer's Linux CI run.

The registered allocator test now links libkernel explicitly and exercises the mapping assumption used when extents coalesce: create two adjacent guest mappings plus a guard, unmap the combined range, query both original addresses to ensure neither remains mapped, preserve the guard, then reuse the combined range with zeroed contents and clean up. This models a merged extent at the kernel boundary; it does not claim to force jemalloc's internal coalescing scheduler or prove Windows execution locally. Both tests pass again on macOS ARM64 and x86_64 with the documented boundary adapter. Full Linux/Windows jobs were skipped on the preceding head and require a maintainer-triggered run for this update.

  • macOS x86-64 Release under Rosetta: production module and source-built allocator with OS-backed kernel/libc boundary fixtures; both allocation and statistics CTests pass.
  • Native macOS arm64 with ASan/UBSan and C++ warnings as errors: both CTests pass.
  • Native execution of the inspected module with the same boundary adapter: allocation results, sizes, five statistics fields, limits, failure outputs, content preservation, purge, callback/options forwarding and destruction of live allocations compared successfully. This is not a console measurement or full AnyPS5 integration run.
  • Statistics comparison: 30,272 overlap cases plus guard-page/null checks. Regression evidence includes a throwing baseline and mutations that remove limit enforcement or arena destruction.
  • Both architectures' shared-library copies pass NID patching with exactly the 13 expected exports and no backend exports.
  • Current tooling checks: 79 conventions tests pass; 48 packaging tests pass with five platform skips. The unchanged base-branch conventions checker passes, including the PR template.
  • Native CMake build: macOS ARM64 and x86_64/Rosetta Release configurations build the pinned sources without invoking autotools or an external allocator Makefile. ctest --test-dir <build> --output-on-failure: guest_jemspace_allocator and guest_jemspace_stats both pass per architecture. This rerun uses real ApplicationHeap.cpp initialization and allocation dispatch with the in-tree test's replacement metadata; guest kernel mappings and unused default-heap boundaries remain substituted. It is not a complete libc/kernel integration build.
  • Dean's c430b3a05d guest-heap test setup is retained. CI build/release workflows and conventions tooling have no changes relative to main; the earlier tool-install steps and checker exception are removed.
  • Linux and Windows compilation/execution, complete AnyPS5 GuestArena/write-watch integration, console behavior and title runs are untested. Windows build setup was reviewed only. No GPU work or performance claim.

Overlap scan against current main: #9452 is the declaration dependency. #9347 independently adds Vorbis/OGG submodule entries and packaging tests at shared insertion points; preserve both sets on merge. The scanner could not compare shared files in #674, #1835, #5021, #5797, #6044, #6879, #8619 and #8739 because those branches conflict with main. The shared changes concern build documentation, input/AOT/wasm tooling, test paths and decoder licensing; they are not additional Jemspace implementations. Shared build/package edits require merge coordination if those branches land first.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #9452
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4972641729 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9855). Originally posted by [kyon-eth](https://github.com/kyon-eth) on 2026-10-22T19:03:04Z. --- ### What Draft follow-up to #9452. Current main integrated: `c2c852d0ec3`. Implement all 13 discovered libSceJemspace exports: arena lifecycle, allocation/reallocation, usable size, statistics snapshots, purge and callback reports. Preserve allocation ownership, per-arena limits, failure outputs and the observed size/alignment rules. Build pinned public jemalloc 5.2.0 directly with CMake from its Git submodule. Configure headers with compiler feature/type probes and generate private-symbol mappings with the compiler toolchain's nm. Replace its page layer with guest kernel mappings and implement the module's extent accounting. Keep allocator internals hidden from NID exports and package its license. No Autoconf, Bash, external Make build, CI tool installation or conventions-checker exception is required. Contracts were inspected at `0x51cb0`–`0x526ce` and the page layer at `0x3a470`–`0x3a75b`. The firmware version is unverified. Both newly resolved names reproduce their NIDs: `sceJemspacePurge` = `s686MsLMwns`, `sceJemspacePrintStats` = `4aop4GKLZaA`. The inspected allocator identifies thirteen further commits unavailable upstream. Matching the exercised contracts does not establish equivalence for that entire delta. Reports intentionally describe the public backend. Remaining uncertainties are recorded in `docs/dev/debt/libSceJemspace.md`. ### Tested Current-main validation (2026-10-30): merged main `c2c852d0ec3`, retaining main's release-packaging changes. Both registered macOS x86-64 allocator/statistics tests pass (**2/2**). Conventions, whitespace and privacy checks pass. No allocator behavior was changed by this integration, and no new Linux/Windows execution or game result is claimed. C-standard follow-up: `libSceJemspace` now requires C11, matching the allocator and symbol-probe targets. Reproduced the reported `ATOMIC_VAR_INIT` failure in `GuestPages.c` on macOS/Clang with `-DCMAKE_C_STANDARD=23`. With the target property added and that global setting retained, the generated compile command uses `-std=gnu11` and both registered Jemspace tests pass. The ordinary x86_64/Rosetta configuration also builds and passes both tests. These runs use the boundary composition documented below. The [independent Windows 11 / WinLibs GCC 15.2 report](https://github.com/boykopovar/AnyPS5/pull/9855#issuecomment-6382134162) verified the preceding head with a global C11 workaround: both registered tests passed against the real Windows libc/libkernel, including combined unmap, guard preservation and range reuse. This target-local fix removes the need for that global workaround; Windows execution of this new commit still needs CI confirmation. Review follow-up: probe the `strerror_r` return type under `_GNU_SOURCE` with compiler warnings treated as errors, matching jemalloc's upstream detection. Define `JEMALLOC_STRERROR_R_RETURNS_CHAR_WITH_GNU_SOURCE` only when that probe succeeds. macOS retains its POSIX/int path; glibc/GNU compilation still needs the maintainer's Linux CI run. The registered allocator test now links libkernel explicitly and exercises the mapping assumption used when extents coalesce: create two adjacent guest mappings plus a guard, unmap the combined range, query both original addresses to ensure neither remains mapped, preserve the guard, then reuse the combined range with zeroed contents and clean up. This models a merged extent at the kernel boundary; it does not claim to force jemalloc's internal coalescing scheduler or prove Windows execution locally. Both tests pass again on macOS ARM64 and x86_64 with the documented boundary adapter. Full Linux/Windows jobs were skipped on the preceding head and require a maintainer-triggered run for this update. - macOS x86-64 Release under Rosetta: production module and source-built allocator with OS-backed kernel/libc boundary fixtures; both allocation and statistics CTests pass. - Native macOS arm64 with ASan/UBSan and C++ warnings as errors: both CTests pass. - Native execution of the inspected module with the same boundary adapter: allocation results, sizes, five statistics fields, limits, failure outputs, content preservation, purge, callback/options forwarding and destruction of live allocations compared successfully. This is not a console measurement or full AnyPS5 integration run. - Statistics comparison: 30,272 overlap cases plus guard-page/null checks. Regression evidence includes a throwing baseline and mutations that remove limit enforcement or arena destruction. - Both architectures' shared-library copies pass NID patching with exactly the 13 expected exports and no backend exports. - Current tooling checks: 79 conventions tests pass; 48 packaging tests pass with five platform skips. The unchanged base-branch conventions checker passes, including the PR template. - Native CMake build: macOS ARM64 and x86_64/Rosetta Release configurations build the pinned sources without invoking autotools or an external allocator Makefile. `ctest --test-dir <build> --output-on-failure`: `guest_jemspace_allocator` and `guest_jemspace_stats` both pass per architecture. This rerun uses real `ApplicationHeap.cpp` initialization and allocation dispatch with the in-tree test's replacement metadata; guest kernel mappings and unused default-heap boundaries remain substituted. It is not a complete libc/kernel integration build. - Dean's `c430b3a05d` guest-heap test setup is retained. CI build/release workflows and conventions tooling have no changes relative to main; the earlier tool-install steps and checker exception are removed. - Linux and Windows compilation/execution, complete AnyPS5 GuestArena/write-watch integration, console behavior and title runs are untested. Windows build setup was reviewed only. No GPU work or performance claim. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Overlap scan against current `main`: #9452 is the declaration dependency. #9347 independently adds Vorbis/OGG submodule entries and packaging tests at shared insertion points; preserve both sets on merge. The scanner could not compare shared files in #674, #1835, #5021, #5797, #6044, #6879, #8619 and #8739 because those branches conflict with `main`. The shared changes concern build documentation, input/AOT/wasm tooling, test paths and decoder licensing; they are not additional Jemspace implementations. Shared build/package edits require merge coordination if those branches land first. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #9452 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
jotitadev commented 2026-10-23 02:18:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-23T02:18:02Z.

Review: COMMENTED


macOS run with the real libc.prx/libkernel.prx instead of boundary fixtures. The allocator builds, but guest_jemspace_allocator aborts as registered.

Machine: Apple M2 Max, macOS 27.2, Apple clang 21, x86-64 build under Rosetta 2, Release, BUILD_TESTING=ON, Python 3.9.6. Autoconf 2.73 (Homebrew) and /usr/bin/make (GNU Make 3.81).

Base/method: main doesn't link on macOS, so the tree is #8658 (feat/macos-port) @ c5fa39620a. This PR's diff at 25e1e3bb9c (git diff merge-base..head -- . ':!docs') is applied on top. .gitmodules and test_package_release.py had add/add conflicts with #8658's ogg/vorbis entries, and I kept both sides. 3rdparty/jemalloc is at b0b3e49a54. Full cmake --build -j4.

  • Build: clean. jemalloc configures with --with-jemalloc-prefix=anyps5_jemspace_ ... --disable-zone-allocator --with-lg-page=14 and builds libjemalloc.a. libSceJemspace.prx is x86-64 Mach-O. nm -gU lists exactly the 13 sceJemspace* exports and nothing else.
  • guest_jemspace_stats: passes.
  • guest_jemspace_allocator: fails 3/3, the same way each time:
sceJemspaceCreate(): flags must be 0
libc++abi: terminating due to uncaught exception of type std::runtime_error: application heap: invalid or missing process parameters

The first sceJemspaceCreate("invalid", 0, 1) returns as expected. The abort comes at the next create, where sceJemspaceCreate gets its Space from malloc_nid_postfix (Export.cpp:179). With the real libc.prx, that goes through ApplicationHeapInitialize_nid_no_patch. It needs the process parameters, plus a libc parameter block with an allocator replacement table at +0x38/+0x30. The test executable has neither, and allocationOrNull only catches bad_alloc, so the runtime_error escapes through the APS5_VABI export and terminates the process.

As a check, I added ProcessParametersFixture::Install with a valid header (size 0x40, magic 0x4942524f). The abort then moves to application heap: null metadata, the missing libc/replacement block. So the test needs a parameter fixture that registers a host-backed allocator, or Space needs to come from somewhere other than the guest heap. I assume the run in the description passed because its OS-backed libc boundary fixture replaced this path.

The failing path is ApplicationProcessParameters/ApplicationHeap, which is shared with Linux (#elif defined(__linux__) || defined(__APPLE__)). So I expect a full Linux build to fail the same way, but I have only run it on macOS.

Also, for BUILD.md: on macOS the build now needs Autoconf, which a stock Xcode install doesn't have (brew install autoconf here). The Make from Xcode's command-line tools is enough.

Python 3.9.6 (Xcode's): tools/tests/test_package_release.py 40 passed (5 platform skips), tools/tests/test_check_conventions_comments.py 72 passed.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5623163284 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9855#pullrequestreview-5623163284). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-23T02:18:02Z. **Review:** COMMENTED --- macOS run with the real `libc.prx`/`libkernel.prx` instead of boundary fixtures. The allocator builds, but `guest_jemspace_allocator` aborts as registered. **Machine:** Apple M2 Max, macOS 27.2, Apple clang 21, x86-64 build under Rosetta 2, Release, `BUILD_TESTING=ON`, Python 3.9.6. Autoconf 2.73 (Homebrew) and `/usr/bin/make` (GNU Make 3.81). **Base/method:** `main` doesn't link on macOS, so the tree is #8658 (`feat/macos-port`) @ `c5fa39620a`. This PR's diff at `25e1e3bb9c` (`git diff merge-base..head -- . ':!docs'`) is applied on top. `.gitmodules` and `test_package_release.py` had add/add conflicts with #8658's ogg/vorbis entries, and I kept both sides. `3rdparty/jemalloc` is at `b0b3e49a54`. Full `cmake --build -j4`. - **Build:** clean. jemalloc configures with `--with-jemalloc-prefix=anyps5_jemspace_ ... --disable-zone-allocator --with-lg-page=14` and builds `libjemalloc.a`. `libSceJemspace.prx` is x86-64 Mach-O. `nm -gU` lists exactly the 13 `sceJemspace*` exports and nothing else. - `guest_jemspace_stats`: passes. - `guest_jemspace_allocator`: fails 3/3, the same way each time: ``` sceJemspaceCreate(): flags must be 0 libc++abi: terminating due to uncaught exception of type std::runtime_error: application heap: invalid or missing process parameters ``` The first `sceJemspaceCreate("invalid", 0, 1)` returns as expected. The abort comes at the next create, where `sceJemspaceCreate` gets its `Space` from `malloc_nid_postfix` (`Export.cpp:179`). With the real `libc.prx`, that goes through `ApplicationHeapInitialize_nid_no_patch`. It needs the process parameters, plus a libc parameter block with an allocator replacement table at `+0x38`/`+0x30`. The test executable has neither, and `allocationOrNull` only catches `bad_alloc`, so the `runtime_error` escapes through the `APS5_VABI` export and terminates the process. As a check, I added `ProcessParametersFixture::Install` with a valid header (size 0x40, magic `0x4942524f`). The abort then moves to `application heap: null metadata`, the missing libc/replacement block. So the test needs a parameter fixture that registers a host-backed allocator, or `Space` needs to come from somewhere other than the guest heap. I assume the run in the description passed because its OS-backed libc boundary fixture replaced this path. The failing path is `ApplicationProcessParameters`/`ApplicationHeap`, which is shared with Linux (`#elif defined(__linux__) || defined(__APPLE__)`). So I expect a full Linux build to fail the same way, but I have only run it on macOS. Also, for BUILD.md: on macOS the build now needs Autoconf, which a stock Xcode install doesn't have (`brew install autoconf` here). The Make from Xcode's command-line tools is enough. Python 3.9.6 (Xcode's): `tools/tests/test_package_release.py` 40 passed (5 platform skips), `tools/tests/test_check_conventions_comments.py` 72 passed. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
MarcZX10 commented 2026-10-23 03:47:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T03:47:26Z.

Review: CHANGES_REQUESTED


I reviewed the registered CTest wiring and the independent macOS run against the actual libc.prx/libkernel.prx. guest_jemspace_allocator aborts on its second sceJemspaceCreate: Export.cpp obtains the arena Space with malloc_nid_postfix, which enters ApplicationHeapInitialize and throws because the test executable has no process-parameter/libc replacement metadata. The current tests catch only std::bad_alloc, so this runtime error escapes and aborts the test. The out-of-tree OS-backed boundary fixture in the PR description does not exercise this registered executable path.

Please make the in-tree registered allocator test runnable with the real linked libc path, for example by installing a valid process-parameter and allocator-replacement fixture or by allocating Space through a path that does not require an uninitialized guest application heap. Then rerun guest_jemspace_allocator and guest_jemspace_stats on a supported platform and report the exact commands/results. The current base-branch conventions check also fails on the new build-tool lookups; the PR documents that the checker exception itself needs base-branch integration, so that gate needs an explicit maintainership path before merge.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5623650682 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9855#pullrequestreview-5623650682). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T03:47:26Z. **Review:** CHANGES_REQUESTED --- I reviewed the registered CTest wiring and the independent macOS run against the actual `libc.prx`/`libkernel.prx`. `guest_jemspace_allocator` aborts on its second `sceJemspaceCreate`: `Export.cpp` obtains the arena `Space` with `malloc_nid_postfix`, which enters `ApplicationHeapInitialize` and throws because the test executable has no process-parameter/libc replacement metadata. The current tests catch only `std::bad_alloc`, so this runtime error escapes and aborts the test. The out-of-tree OS-backed boundary fixture in the PR description does not exercise this registered executable path. Please make the in-tree registered allocator test runnable with the real linked libc path, for example by installing a valid process-parameter and allocator-replacement fixture or by allocating `Space` through a path that does not require an uninitialized guest application heap. Then rerun `guest_jemspace_allocator` and `guest_jemspace_stats` on a supported platform and report the exact commands/results. The current base-branch conventions check also fails on the new build-tool lookups; the PR documents that the checker exception itself needs base-branch integration, so that gate needs an explicit maintainership path before merge.
jotitadev commented 2026-10-23 08:03:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-23T08:03:30Z.

Review: COMMENTED


Follow-up to my earlier macOS report: on head c430b3a05d the guest_jemspace_allocator abort is gone.

Apple M2 Max, macOS 27.2, Apple clang 21.0.0 (Xcode 27), x86_64 under Rosetta, Release, system Python 3.9.6. Base is #8658 @ 37a9a6b4be (main plus the macOS port) with this PR merged and the 3rdparty/jemalloc submodule checked out.

  • guest_jemspace_stats and guest_jemspace_allocator pass 3/3.
  • With only c430b3a05d reverted, guest_jemspace_allocator still aborts with application heap: invalid or missing process parameters, so the new heap setup is what fixes it.
  • tools/tests/test_check_conventions_comments.py and tools/tests/test_package_release.py pass on Python 3.9.6 (5 skips in the latter).

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5625530657 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9855#pullrequestreview-5625530657). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-23T08:03:30Z. **Review:** COMMENTED --- Follow-up to my earlier macOS report: on head `c430b3a05d` the `guest_jemspace_allocator` abort is gone. Apple M2 Max, macOS 27.2, Apple clang 21.0.0 (Xcode 27), x86_64 under Rosetta, Release, system Python 3.9.6. Base is #8658 @ `37a9a6b4be` (main plus the macOS port) with this PR merged and the `3rdparty/jemalloc` submodule checked out. - `guest_jemspace_stats` and `guest_jemspace_allocator` pass 3/3. - With only `c430b3a05d` reverted, `guest_jemspace_allocator` still aborts with `application heap: invalid or missing process parameters`, so the new heap setup is what fixes it. - `tools/tests/test_check_conventions_comments.py` and `tools/tests/test_package_release.py` pass on Python 3.9.6 (5 skips in the latter). Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
MarcZX10 commented 2026-10-28 22:21:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T22:21:06Z.

Review: CHANGES_REQUESTED


The previous blockers around the registered allocator test setup, Jemspace public declarations, and C11 compiler selection appear addressed in the current tree. The author reports both registered tests passing on macOS x86-64 and on a Windows head before the last current-main integration; the latter included the real linked libc/libkernel test path. I did not run these tests locally. Current hosted checks include successful eligibility and relinker jobs; full Linux/Windows product jobs are skipped.

The exact head 64d8650470407360c39c3b342f3ad1ddb5eac1d2 is cleanly mergeable but is based on main 9ae2f7d22a, 1,304 commits behind the current tip. Please update it to current main as required by the branch rule and rerun guest_jemspace_allocator and guest_jemspace_stats on that head, preferably on both Linux and Windows because the page adapter and toolchain detection are platform-sensitive. The existing detailed macOS and Windows evidence supports the design, but it does not cover the resulting current-main tree.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5690455079 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9855#pullrequestreview-5690455079). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T22:21:06Z. **Review:** CHANGES_REQUESTED --- The previous blockers around the registered allocator test setup, Jemspace public declarations, and C11 compiler selection appear addressed in the current tree. The author reports both registered tests passing on macOS x86-64 and on a Windows head before the last current-main integration; the latter included the real linked libc/libkernel test path. I did not run these tests locally. Current hosted checks include successful eligibility and relinker jobs; full Linux/Windows product jobs are skipped. The exact head `64d8650470407360c39c3b342f3ad1ddb5eac1d2` is cleanly mergeable but is based on main `9ae2f7d22a`, 1,304 commits behind the current tip. Please update it to current `main` as required by the branch rule and rerun `guest_jemspace_allocator` and `guest_jemspace_stats` on that head, preferably on both Linux and Windows because the page adapter and toolchain detection are platform-sensitive. The existing detailed macOS and Windows evidence supports the design, but it does not cover the resulting current-main tree.
MarcZX10 commented 2026-11-23 06:48:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T06:48:37Z.

Review: COMMENTED


Reviewed — comments

Nothing blocks this review; the points below are optional.

What I ran

Reviewed head 4cb2235bc0d70b9fd6ca23ad5357f579371fa4ba using the prepared diff and the pinned repo_read.py reader. No build or tests were run in this review.

Results

Check Result Note
Diff and targeted source review passed Core allocator and build changes inspected
Build and tests not run Relied on author-reported results

Findings

Blocking

None identified in the code read.

Non-blocking

None.

Not verified

The review was incomplete: I did not read every changed file listed in the manifest or run checks. Files read: description.md, commits.md, manifest.json, diff.patch; repository files .gitmodules, core/libs/prx/libSceJemspace/Export.cpp, core/libs/prx/libSceJemspace/Jemalloc.cmake, core/libs/prx/libSceJemspace/JemallocConfig.cmake, and core/libs/prx/libSceJemspace/include/Api.hpp. The changed submodule pointer 3rdparty/jemalloc was excluded from full text because it is not plain text. Other changed files were not read. Linux/Windows builds and execution, console behavior, and full integration were not verified here.

To get this to a good state

Nothing is required. Optional: complete review of the unread changed files and run the relevant CI checks before making a formal merge decision.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6017527315 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9855#pullrequestreview-6017527315). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-23T06:48:37Z. **Review:** COMMENTED --- # Reviewed — comments Nothing blocks this review; the points below are optional. ## What I ran Reviewed head `4cb2235bc0d70b9fd6ca23ad5357f579371fa4ba` using the prepared diff and the pinned `repo_read.py` reader. No build or tests were run in this review. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted source review | passed | Core allocator and build changes inspected | | Build and tests | not run | Relied on author-reported results | ## Findings ### Blocking None identified in the code read. ### Non-blocking None. ## Not verified The review was incomplete: I did not read every changed file listed in the manifest or run checks. Files read: `description.md`, `commits.md`, `manifest.json`, `diff.patch`; repository files `.gitmodules`, `core/libs/prx/libSceJemspace/Export.cpp`, `core/libs/prx/libSceJemspace/Jemalloc.cmake`, `core/libs/prx/libSceJemspace/JemallocConfig.cmake`, and `core/libs/prx/libSceJemspace/include/Api.hpp`. The changed submodule pointer `3rdparty/jemalloc` was excluded from full text because it is not plain text. Other changed files were not read. Linux/Windows builds and execution, console behavior, and full integration were not verified here. ## To get this to a good state Nothing is required. Optional: complete review of the unread changed files and run the relevant CI checks before making a formal merge decision.
ligmaSec commented 2026-12-03 13:25:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T13:25:18Z.

Review: COMMENTED


Built the branch allocator against its pinned jemalloc source in a focused Linux CMake build. Both registered CTests passed, covering allocator operations and statistics.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6170655810 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9855#pullrequestreview-6170655810). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T13:25:18Z. **Review:** COMMENTED --- Built the branch allocator against its pinned jemalloc source in a focused Linux CMake build. Both registered CTests passed, covering allocator operations and statistics. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/9855:upstream-pr/9855'
git switch 'upstream-pr/9855'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/9855'
git switch 'upstream-pr/9855'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/9855'
git switch 'upstream-pr/9855'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/9855'
git switch 'main'
git merge --squash 'upstream-pr/9855'
git switch 'main'
git merge --ff-only 'upstream-pr/9855'
git switch 'main'
git merge 'upstream-pr/9855'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!9855
No description provided.