mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:50:52 +01:00
[PR #1104] runtime/shims: shim GetLogicalProcessorInformation and GlobalMemoryStatusEx (OLD-9816) #1138
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1138
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1104
Author: @ambroseautomation
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:carry/old-9816-sysinfo-shims📝 Commits (1)
7042503runtime/shims: shim GetLogicalProcessorInformation and GlobalMemoryStatusEx📊 Changes
4 files changed (+489 additions, -2 deletions)
View changed files
📝
runtime/CMakeLists.txt(+14 -0)➕
runtime/shims/sysinfo.cpp(+297 -0)➕
runtime/test/sysinfo_test.cpp(+176 -0)📝
scripts/build_runtime.ps1(+2 -2)📄 Description
Claimed in the coordination issue as: OLD-9816 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140741518)
What and why
Carries forward
old-pr/9816(draft #88, original commit authorpiyonchupreserved; indexed in #17), rebased cleanly onto currentmain(71f99e224) without the stray UTF-8 BOM inscripts/build_runtime.ps1.Shims
GetLogicalProcessorInformationandGlobalMemoryStatusExacrosskernel32.dll,kernelbase.dll, andapi-ms-win-core-sysinfo-l1-1-0.dllinruntime/shims/sysinfo.cpp:GetLogicalProcessorInformationsize-probe contract (FALSE+ERROR_INSUFFICIENT_BUFFERwith required byte count) and falls back to a synthesized topology if the host fails or returns an empty buffer.LEONIDA_CPU_TOPOLOGY(xbox/scarlettfor 8c/16t with SMT + L1/L2/L3/NUMA/package records,NxM,N, orhost) andLEONIDA_SYSTEM_MEMORY_MB(xbox/scarlettfor 16384 MiB, or explicit MiB clamped to[256, 1048576]).owns_dllfalse forkernel32.dll,kernelbase.dll, andapi-ms-win-core-sysinfo-l1-1-0.dll.sysinfo_testinruntime/CMakeLists.txtand addsshims\sysinfo.cpptoscripts/build_runtime.ps1.Tested
sysinfo_test.exenatively on Windows 11 with MSVC (/std:c++20 /EHsc /W4 /permissive- /utf-8 /O2):sysinfo_test: PASS (0 failures), zero compiler warnings.runtime/build/gta6rt.exevia.\scripts\build_runtime.ps1 -jobs 8: succeeded cleanly withshims\sysinfo.cpplinked.python -I tests/test_build_runtime_fallback.py: 10 tests, OK.python -I tests/test_text_write_line_endings.py: 3 tests, OK.python -I scripts/check_no_game_data.py runtime/CMakeLists.txt runtime/shims/sysinfo.cpp runtime/test/sysinfo_test.cpp scripts/build_runtime.ps1: exit 0 (no game data).GPUs tested: n/a (CPU/OS runtime shim; built and tested on Windows 11 Pro 64-bit, MSVC VS 18)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a — runtime shim)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.