Repository navigation
fix(kernel): honor the declared flexible memory budget - #4508
Conversation
4674ee9 to
609e923
Compare
|
Which title declares |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
Hey @oneandonlydean The title is Black Myth: Wukong, PPSA23226, master version 02.00, content version 01.000.010 (content ID Its installed {
"titleId": "PPSA23226",
"kernel": {
"flexibleMemorySize": 838860800
}
}
The pre-fix startup log contains this failure at line 154: I also reproduced the same failure today in a controlled regression run, using the integrated Wukong branch and changing only the configured budget back to the 448 MiB default used by main. The unchanged installation produced: The request is 512 KiB; image segments and tracked flexible mappings already account for 538.84375 MiB, exceeding the hardcoded 448 MiB budget. With the fix restored, the startup log prints the requested diagnostic at line 154: |
|
Two things left before this goes in:
|
|
Tested on Windows with Black Myth: Wukong (PPSA23226). Its Without this PR, the title stops 12.5 s after launch: With this PR merged into the same build, there is no The build was |
|
Both points are in. The branch now has a merge commit ( |
Read the optional aligned budget from param.json and apply it consistently to configured, available and mapped flexible memory. Add parser and allocation regression coverage.
6db4f9e to
12851ef
Compare
rebased @oneandonlydean |
What
Read the optional
kernel.flexibleMemorySizevalue fromparam.jsonand apply it consistently to configured, available and mapped flexible memory. Keep the 448 MiB default when the field is absent, and reject values that are not positive 16 KiB-aligned unsigned integers.Add parser and guest-memory regression coverage for declared, limited, default, missing and invalid budgets, including accounting for loaded guest module segments.
Tested
Windows, MinGW-w64 GCC 15.2.0, Release.
param_json_parser_testsandguest_flexible_memory_budget_tests.param_json_parserand the fiveguest_flexible_memory_*cases: 6/6 passed.python tools/check_conventions.py --base origin/mainpassed.git diff --checkpassed.kernel.flexibleMemorySize: 838860800(800 MiB) inparam.json.[memory] flexible memory exhausted: request 0x80000 with 0x21ad8000 of 0x1c000000 in use[memory] configured flexible memory: 0x32000000 bytes (800 MiB)and continued loading for about 73 seconds before being stopped; reaching the menu was not confirmed.Checklist
main; no other open PR implements the same functions