Repository navigation
docs(usage): name the mimalloc DLLs a self-built Windows libs/ needs - #8909
Open
dantdmdarealguy wants to merge 1 commit into
Open
dantdmdarealguy wants to merge 1 commit into
dantdmdarealguy wants to merge 1 commit into
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
harisibrar1
approved these changes
Oct 21, 2026
harisibrar1
left a comment
There was a problem hiding this comment.
Checked against main:
core/libs/CMakeLists.txt:207-227writesmimalloc.dllandmimalloc-redirect.dlltobuild/core/libs/libsaslibsoutputs, andtools/package_release.py:58puts both in the Windows archive, so "copy both frombuild/core/libs/libs; the release archives contain them" matches.WindowsEntryStubBuilder.cpp:103,125-133loads<run path>mimalloc.dllonly whenAPS5_MIMALLOCis set, anddocs/dev/ARCHITECTURE.md:65-66says the load fails quietly without the DLL, so "keeps the C runtime's heap and prints nothing" is accurate.docs/user/USAGE.md:169,177on main lists only the.prxfiles and the three MinGW DLLs, so the two DLLs were missing from the runtime layout.tools/check_conventions.py --base main --head pr-8909passes.
Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Since #6067 the Windows
libstarget also writesmimalloc.dllandmimalloc-redirect.dlltobuild/core/libs/libs(core/libs/CMakeLists.txtL207-227).tools/package_release.pyL55 puts both in the release archives. The Windows entry stub loadsmimalloc.dllfrom the run path only whenAPS5_MIMALLOCis set (WindowsEntryStubBuilder.cppL103-133, ARCHITECTURE.md L65-66). The runtime layout in USAGE.md tells a self-builtlibs/to takebuild/core/libs/libs/*.prxand the three MinGW runtime DLLs, and nothing else. #6067 did not change USAGE.md. Alibs/set up that way runs withAPS5_MIMALLOCset, but it never loads mimalloc and prints nothing.The paragraph on the MinGW runtime DLLs now names the two mimalloc DLLs: they are loaded from
libs/withAPS5_MIMALLOC, they are copied frombuild/core/libs/libs, and without them the title keeps the C runtime's heap and prints nothing.Tested
Windows 11 Pro, Intel Core i9-14900K, 128 GB RAM, NVIDIA GeForce RTX 5080 (driver 32.0.16.1742), WinLibs GCC 15.2.0 (
15.2.0posix-14.0.0-ucrt-r7), Git for Windows 2.51.0.Setup: a fresh clone of
main(6696def6e), with the Windows steps ofdocs/dev/BUILD.mdanddocs/user/USAGE.mdrun in the order given, in Windows PowerShell:git submodule update --init --recursive$env:PATHline, withC:\winlibs\mingw64\binas the toolchain pathcmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, withSSL_CERT_FILEset to Git'smingw64CA bundle as the Requirements saycmake --build buildcmake --build build --target libsCopy-ItemloopScreenTester5 (PPSA69420) was then unwrapped with
tools/unwrap_self.py, relinked withrelinker --windows source/eboot.elf run/app.exeand laid out as the runtime layout says:libs/withbuild/core/libs/libs/*.prxand the three MinGW DLLs, andapp0/witheboot.bin,sce_sys/and the convertedsce_module/..\app.exeruns to its menu.$env:APS5_MIMALLOC = "1"; .\app.exe. The title runs, but nomimalloc*module is loaded in the process ((Get-Process -Id <pid>).Modules), and stdout and stderr have no line about it. With onlymimalloc.dllcopied, nothing is loaded either.build/core/libs/libsintolibs/as the changed paragraph says: the same command loadslibs\mimalloc.dllandlibs\mimalloc-redirect.dll, and the title runs to its menu.python3 tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.py --branch agent/docsweepreports no overlap with the PRs it could compare. It could not compare 9 PRs that conflict withmain(feat(aot): consolidate native ARM64 compiler, runtime and consumers #5021, perf(agc): build the pipelines of a submission ahead on a compile pool #5925, feat(agc): select Vulkan devices by driver name #6788, perf(recompiler): keep runtime-specialized shader modules in the shader disk cache #6924, perf(agc): draw finisher pipeline (APS5_DRAW_PIPELINE) #6946, perf(agc): GPU descriptor heap (APS5_GPU_HEAP) #6947, feat(agc): look up table images at run time through a device image table on the GPU heap (APS5_GPU_PATH) #7642, fix(agc): reclaim idle images safely during cache creation #7800, fix(relinker): rewrite XSAVEOPT to XSAVE under --to-rosetta #7918). None of their USAGE.md hunks touch this paragraph or mention mimalloc.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)What was run, step by step (fresh clone
X:/aps5-agents/docsweep-work/AnyPS5,main6696def6e)git submodule update --init --recursive--reference-if-ableto the local clone andsubmodule.alternateLocation=superprojectto save bandwidth; this does not change the commands)15.2.0posix-14.0.0-ucrt-r7, Git with Bash, Python 3C:\winlibs\mingw64$env:PATH = "...\mingw64\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin;$env:PATH"C:\winlibs\mingw64\bininstead ofC:\tools\winlibs\...(the doc says to adjust)cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++SSL_CERT_FILE:Could not download FFmpeg 9ac4cfd195f1: 60;"SSL peer certificate or SSH remote key was not OK...", exactly as the Requirements bullet predicts. With$env:SSL_CERT_FILE = "C:\Program Files\Git\mingw64\etc\ssl\certs\ca-bundle.crt"(Git 2.51 < 2.56, somingw64, as the doc says): okcmake --build build --parallel.prxbuilt (matches "With the default BUILD_TESTING=OFF, the default build does not produce them")--parallel 6(machine rule)cmake --build build --target libs --parallel.prxinbuild/core/libs/libsplusmimalloc.dll,mimalloc-redirect.dll,unpatched/,implib/. 6 warnings, all in glslang or libstdc++ headers--parallel 6Copy-Itemloop$toolchainBin = "C:\winlibs\mingw64\bin"tools/unwrap_self.pyon the title'seboot.bin(SELF4f153d1d) andsce_module/libc.prx(fSELF5414f5ee)X:/aps5-agents/homebrew1-titles/PPSA69420-hb1/extracted/PPSA69420relinker --windows source/eboot.elf run/app.exeapp0/sce_module/libc.prx.guest.prxrelinkeris not on PATH; ranbuild/core/relinker/relinker.exe(see follow-up 1).\app.exe(SDL_AUDIODRIVER=dummy)X:/aps5-agents/docsweep-work/shots/screentester5.png), no error linesREADME.md has no Windows steps; it links to BUILD.md and USAGE.md. Nothing in it to follow or fix.
All the main-path steps work as written. The only verified inaccuracy is the one fixed: the Windows runtime layout leaves out the two mimalloc DLLs.
Evidence for the fix
core/libs/CMakeLists.txtL207-227:if(TARGET mimalloc)copiesmimalloc.dll(withpe_import_first) andmimalloc-redirect.dllintoPATCHED_DIR(build/core/libs/libs) aslibsoutputs. The mimalloc target is created in the rootCMakeLists.txtL358-363 (the MinGW branch).WindowsEntryStubBuilder.cppL103 and L125-133:APS5_MIMALLOCandpath + "mimalloc.dll", wherepathis the run path (libs/by default). ARCHITECTURE.md L65-66 says the same and says the load fails quietly without the DLL.tools/package_release.pyL54-55: the Windows archive gets the three MinGW DLLs and both mimalloc DLLs. Therelease_packagectest passes.git show --stat 9824c46fe(feat(libs): let relinked Windows games opt into mimalloc #6067, merged 2026-10-19) changed ARCHITECTURE.md and ENVIRONMENT.md but not USAGE.md.APS5_MIMALLOC=1, reading(Get-Process).Modules12 s after launch (X:/aps5-agents/docsweep-scripts/mimalloc_probe.ps1):mimalloc.dllonly: none loaded;libs\mimalloc.dllandlibs\mimalloc-redirect.dllloaded.mimalloctext, and the title reaches its menu.gh pr list --state all --search mimalloc,gh issue list --search mimalloc). Claimed on the board (feat(shader): implement MIMG sample/gather flag variants #226), with finding refactor(ajm): drop duplicated stub exports from libSceAjm and libSceAjmi #228.Verification of the branch (
$BUILD_DIR=X:/aps5-agents/docsweep-build)git submodule update --init --recursivefixed it. This was my environment, not a doc problem.cmake --build "$BUILD_DIR" --parallel 6fails on one target only:agc_driver_image_array_window_past_layer_limit_tests(ImageArrayWindowPastLayerLimit.cpp:33:52: error: requested alignment '65536' exceeds object file maximum 8192). It is on unmodifiedmain(fromed599f525), it is MinGW-only and winsweep3 already reported it. Open PR test(agc): align the array window test's texels at run time #8310 fixes it. With-- -k 0every other target builds.cmake --build "$BUILD_DIR" --target libs --parallel 6: ok.ctest --test-dir "$BUILD_DIR" --output-on-failure --timeout 120 --parallel 2 -R "^(release_package|patched_libraries|pe_import_first)$": 3/3 pass,354 patched libraries loaded, 0 failed.python tools/check_test_registration.py "$BUILD_DIR":1140 test executable(s), 0 built and not run as recorded, none new.python tools/check_conventions.py --base origin/main:All conventions checks passed.Other findings, not fixed (for follow-ups)
relinker ...as if it were on PATH. BUILD.md names the executable's path only for the relinker-only build (build-relinker/core/relinker/relinker). The full build writes it tobuild/core/relinker/relinker.exe, and the docs never say so. A reader of the Windows steps has to find it. This is minor and only a missing pointer.SSL_CERT_FILE. The configure command fails with status 60 unless the reader has applied the Requirements bullet. The doc is correct, but the Windows section's order invites the failure. A one-line$env:SSL_CERT_FILE = ...beside the$env:PATHline would make the sequence runnable as written. I didn't change it, to keep one topic, and because docs(build): note the Group Policy script block on libusb's version step #8568 and docs(build): point the antivirus note at the relinker tests' test-temp #8619 are open on BUILD.md.libs/directory, copy these DLLs with the patched.prxfiles") has the same omission as USAGE.md. It could point at the USAGE paragraph. It's a different file, so it was left out of this commit.libs/*.prxandapp0/..., not the MinGW runtime DLLs that a self-built Windowslibs/needs. That's code, not docs.ANYPS5_RELINKER_CLI(core/relinker/CMakeLists.txt:1, defaultON; forcedOFFfor WASM). Not Windows-specific.build.yml/release.yml);StandAlone/CMakeLists.txt:34);gen-describe.ps1with Bash/cygpath;libs/patched_libraries_testsdependency;build/core/libs/libsandunpatchedpaths;agc_*_replaytargets and paths;Not done or uncertain
ucrt64CA-bundle path, because this machine has Git 2.51 (mingw64).release.ymltries both.X:/aps5-agents/docsweep-work/title/run), refactor(ajm): drop duplicated stub exports from libSceAjm and libSceAjmi #228 (finding).