Diagnostics/process memory snapshot #484

Closed
github-bot wants to merge 3 commits from gh-pr/484/head into gh-pr/484/base
Owner

@⁠ToxicmaggotRP on GitHub · 2026-11-24 03:57 UTC · original
ToxicmaggotRP:diagnostics/process-memory-snapshot → main · +48 −9 · 1 files · 3 commits · closed without merging

Diagnostics: report process private and resident memory

Related to #471 (memory growth during world load).

What

The diagnostics copy-stat line already samples process page faults through K32GetProcessMemoryInfo, but it only requests the base PROCESS_MEMORY_COUNTERS structure.

This change adds the extended counters needed to correlate copy-path measurements with the process's actual memory footprint:

  • Query PROCESS_MEMORY_COUNTERS_EX.
  • Log PrivateUsage (process private commit charge) and WorkingSetSize (resident working set) in GiB.
  • Preserve the previous successful page-fault sample if the OS query temporarily fails.
  • Omit the memory snapshot if the query fails, rather than logging misleading zero values.

This is process-wide telemetry. It does not attribute memory to individual pools or staging buffers, and it does not fix the memory ceiling by itself. It provides a reliable process-memory series to compare with existing copy statistics and the memory optimisations in #472.

Verification

  • Checked the repository's pinned windows-sys 0.61.2 API signature and structure fields.
  • Checked Microsoft's API contract for PROCESS_MEMORY_COUNTERS_EX.
  • Confirmed that only crates/victory-gpu/src/copystat.rs changes.
  • Branch is three commits ahead of main, with no upstream commits missing.
  • cargo fmt, cargo check -p victory-gpu --features diagnostics, tests, and a Windows diagnostics run were not performed because Rust/Cargo are unavailable in the development environment.

No game assets or proprietary files used.

AI-assisted contribution (ChatGPT).

**@⁠ToxicmaggotRP** on GitHub · 2026-11-24 03:57 UTC · [original](https://github.com/Marvisak/VIctory/pull/484) `ToxicmaggotRP:diagnostics/process-memory-snapshot` → `main` · +48 −9 · 1 files · 3 commits · closed without merging # Diagnostics: report process private and resident memory Related to #471 (memory growth during world load). ## What The diagnostics copy-stat line already samples process page faults through `K32GetProcessMemoryInfo`, but it only requests the base `PROCESS_MEMORY_COUNTERS` structure. This change adds the extended counters needed to correlate copy-path measurements with the process's actual memory footprint: - Query `PROCESS_MEMORY_COUNTERS_EX`. - Log `PrivateUsage` (process private commit charge) and `WorkingSetSize` (resident working set) in GiB. - Preserve the previous successful page-fault sample if the OS query temporarily fails. - Omit the memory snapshot if the query fails, rather than logging misleading zero values. This is process-wide telemetry. It does not attribute memory to individual pools or staging buffers, and it does not fix the memory ceiling by itself. It provides a reliable process-memory series to compare with existing copy statistics and the memory optimisations in #472. ## Verification - Checked the repository's pinned `windows-sys 0.61.2` API signature and structure fields. - Checked Microsoft's API contract for `PROCESS_MEMORY_COUNTERS_EX`. - Confirmed that only `crates/victory-gpu/src/copystat.rs` changes. - Branch is three commits ahead of `main`, with no upstream commits missing. - `cargo fmt`, `cargo check -p victory-gpu --features diagnostics`, tests, and a Windows diagnostics run were not performed because Rust/Cargo are unavailable in the development environment. No game assets or proprietary files used. AI-assisted contribution (ChatGPT).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:05:42 +00:00
github-bot closed this pull request 2026-11-26 04:05:42 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!484
No description provided.