Update memory accounting - #5979
Merged
Merged
Conversation
akleshchev
commented
Jul 6, 2026
Contributor
- Properly track commit charge on windows
- Report memory stats to bugsplat
- Fix virtual memory overflow
akleshchev
force-pushed
the
andreyk/viewer_4604_commit_charge
branch
from
July 6, 2026 18:00
f669585 to
e851bfa
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the viewer’s memory accounting and reporting to better reflect Windows commit charge, add crash-time memory stats to BugSplat reports, and reduce risk of memory-stat overflows by switching certain accounting to MB units.
Changes:
- Add Windows-only commit-availability tracking and expose it to texture memory-pressure logic.
- Cache memory queries (physical + commit) behind a 1s timer to reduce repeated sampling overhead.
- Extend BugSplat crash attributes with additional memory telemetry.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| indra/newview/llviewertexture.h | Declares Windows-only commit-memory accessor for texture system. |
| indra/newview/llviewertexture.cpp | Adds cached sampling and incorporates commit availability into low/critical memory checks on Windows. |
| indra/newview/llappviewerwin32.cpp | Adds crash-time memory stats to BugSplat attributes. |
| indra/llcommon/llsys.h | Changes LLMemoryInfo available-memory API to update internal cached stats rather than returning via out-param. |
| indra/llcommon/llsys.cpp | Implements new memory stat update path; populates LLMemory-backed cached fields on Windows and other platforms. |
| indra/llcommon/llmemory.h | Adds Windows-only commit-availability accessor and allows LLMemoryInfo to update LLMemory’s cached stats. |
| indra/llcommon/llmemory.cpp | Adapts updateMemoryInfo() to new LLMemoryInfo API and exposes commit availability getter. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
akleshchev
force-pushed
the
andreyk/viewer_4604_commit_charge
branch
from
July 6, 2026 18:19
e851bfa to
ec7a935
Compare
maxim-productengine
approved these changes
Jul 6, 2026
akleshchev
force-pushed
the
andreyk/viewer_4604_commit_charge
branch
from
July 6, 2026 18:59
ec7a935 to
abad2c2
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
indra/llcommon/llsys.h:142
- The comment says all stats-map values are in kilobytes, but this PR changes Windows virtual-memory values to be reported in megabytes (e.g., "Total Virtual MB"). Please update the comment to avoid misleading consumers.
// Retrieve a map of memory statistics. The keys of the map are platform-
// dependent. The values are in kilobytes to try to avoid integer overflow.
LLSD getStatsMap() const;
akleshchev
force-pushed
the
andreyk/viewer_4604_commit_charge
branch
from
July 7, 2026 04:29
abad2c2 to
1f58c99
Compare
akleshchev
force-pushed
the
andreyk/viewer_4604_commit_charge
branch
from
July 7, 2026 05:35
1f58c99 to
be66eeb
Compare
akleshchev
force-pushed
the
andreyk/viewer_4604_commit_charge
branch
from
July 7, 2026 11:18
be66eeb to
05eb6e7
Compare
akleshchev
force-pushed
the
andreyk/viewer_4604_commit_charge
branch
from
July 7, 2026 14:40
05eb6e7 to
99dc81f
Compare
akleshchev
force-pushed
the
andreyk/viewer_4604_commit_charge
branch
2 times, most recently
from
July 7, 2026 14:51
c2a81bc to
500cf6c
Compare
# Conflicts: # indra/newview/llappviewerwin32.cpp
akleshchev
force-pushed
the
andreyk/viewer_4604_commit_charge
branch
from
July 7, 2026 15:04
500cf6c to
1803fa2
Compare
maxim-productengine
approved these changes
Jul 7, 2026
akleshchev
force-pushed
the
andreyk/viewer_4604_commit_charge
branch
from
July 7, 2026 15:33
1803fa2 to
24ea2d9
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.