Repository navigation
feat(libkernel): report vm.overcommit through sysctlbyname - #5184
Conversation
|
Linux run: Ubuntu in WSL2, GCC 15.2.0, Ninja Release, |
|
A title that stops here on |
The mimalloc in PS5MC (PPSA99420) reads vm.overcommit at start-up and stopped on the unsupported name. It reports FreeBSD's default, 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Rebased onto main to resolve the conflict in |
341fbb2 to
dad29ca
Compare
What
PS5MC (PPSA99420, Kodi 22, catalog release) stops right after its
heap: 2048 MiB of direct memoryline on Windows:All three of its
sysctlbyname("vm.overcommit")call sites (guest 0x3A4C351, 0x3A4CFA9, 0x3A4E43E) are mimalloc'sunix_detect_overcommit. Each reads the page size throughsysconf(47), thenvm.overcommitinto a zeroed 4-byteint, and sets mimalloc's overcommit flag from(result | value) != 0; mimalloc's start-up messages "secure level: %d" and "mem tracking: %s" follow the first site.sysctlbyname("vm.overcommit")now reports 0, the default FreeBSD gives itsintvm.overcommit. It goes through the existingCopyOut: a null buffer gets the length 4, and a short buffer gets a partial copy andENOMEM. A write, which FreeBSD takes as a new policy, throws. The console's value is unknown; this is recorded under Unknown function info indocs/dev/debt/libkernel.md.Tested
main3faa9cb40. Before this change it stops as above within 3 s. After, mimalloc starts and Python's start-up is next (feat(libkernel): report _SC_CLK_TCK through sysconf #5185, fix(libkernel): handle FIOCLEX and FIONCLEX in ioctl #5186); with those too, Kodi creates its GUI and runs for the whole 90 s run.guest_system_configurationcovers the length query, the value, a 2-byte buffer (ENOMEM, the rest untouched,errnootherwise unchanged) and a throwing write. All 125 libkernel tests pass on Windows; Linux was not built locally.python tools/check_conventions.py --base origin/mainpasses. feat(libkernel): report machdep.tsc_freq through sysctlbyname #5078 and feat(libkernel): report hw.realmem through sysctl #5098 add other names in the same part ofSystemConfiguration.cppand the same debt list; whichever merges later needs a trivial rebase.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)🤖 Generated with Claude Code