Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
a623efcc
Commit
a623efcc
authored
3 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Fix rollover issues and small optimization to memory getters on windows
parent
290f83da
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/llcommon/llsys.cpp
+13
-13
13 additions, 13 deletions
indra/llcommon/llsys.cpp
with
13 additions
and
13 deletions
indra/llcommon/llsys.cpp
+
13
−
13
View file @
a623efcc
...
@@ -726,12 +726,12 @@ U32Kilobytes LLMemoryInfo::getPhysicalMemoryKB() const
...
@@ -726,12 +726,12 @@ U32Kilobytes LLMemoryInfo::getPhysicalMemoryKB() const
void
LLMemoryInfo
::
getAvailableMemoryKB
(
U32Kilobytes
&
avail_physical_mem_kb
,
U32Kilobytes
&
avail_virtual_mem_kb
)
void
LLMemoryInfo
::
getAvailableMemoryKB
(
U32Kilobytes
&
avail_physical_mem_kb
,
U32Kilobytes
&
avail_virtual_mem_kb
)
{
{
#if LL_WINDOWS
#if LL_WINDOWS
// Sigh, this shouldn't be a static method, then we wouldn't have to
MEMORYSTATUSEX
state
;
// reload this data separately from refresh()
state
.
dwLength
=
sizeof
(
state
);
LLSD
statsMap
(
loadStatsMap
()
);
GlobalMemoryStatusEx
(
&
state
);
avail_physical_mem_kb
=
(
U32Kilob
ytes
)
stat
sMap
[
"
Avail
Phys
ical KB"
].
asInteger
(
);
avail_physical_mem_kb
=
U64B
ytes
(
stat
e
.
ull
AvailPhys
);
avail_virtual_mem_kb
=
(
U32Kilob
ytes
)
stat
sMap
[
"
Avail
Virtual
KB"
].
asInteger
(
);
avail_virtual_mem_kb
=
U64B
ytes
(
stat
e
.
ull
AvailVirtual
);
#elif LL_DARWIN
#elif LL_DARWIN
// mStatsMap is derived from vm_stat, look for (e.g.) "kb free":
// mStatsMap is derived from vm_stat, look for (e.g.) "kb free":
...
@@ -882,14 +882,14 @@ LLSD LLMemoryInfo::loadStatsMap()
...
@@ -882,14 +882,14 @@ LLSD LLMemoryInfo::loadStatsMap()
GlobalMemoryStatusEx
(
&
state
);
GlobalMemoryStatusEx
(
&
state
);
DWORDLONG
div
=
1024
;
DWORDLONG
div
=
1024
;
DWORDLONG
div_mb
=
1024
*
1024
;
stats
.
add
(
"Percent Memory use"
,
state
.
dwMemoryLoad
/
div
);
stats
.
add
(
"Percent Memory use"
,
state
.
dwMemoryLoad
);
stats
.
add
(
"Total Physical
K
B"
,
state
.
ullTotalPhys
/
div
);
stats
.
add
(
"Total Physical
M
B"
,
state
.
ullTotalPhys
/
div
_mb
);
stats
.
add
(
"Avail Physical
K
B"
,
state
.
ullAvailPhys
/
div
);
stats
.
add
(
"Avail Physical
M
B"
,
state
.
ullAvailPhys
/
div
_mb
);
stats
.
add
(
"Total page
K
B"
,
state
.
ullTotalPageFile
/
div
);
stats
.
add
(
"Total page
M
B"
,
state
.
ullTotalPageFile
/
div
_mb
);
stats
.
add
(
"Avail page
K
B"
,
state
.
ullAvailPageFile
/
div
);
stats
.
add
(
"Avail page
M
B"
,
state
.
ullAvailPageFile
/
div
_mb
);
stats
.
add
(
"Total Virtual
K
B"
,
state
.
ullTotalVirtual
/
div
);
stats
.
add
(
"Total Virtual
M
B"
,
state
.
ullTotalVirtual
/
div
_mb
);
stats
.
add
(
"Avail Virtual
K
B"
,
state
.
ullAvailVirtual
/
div
);
stats
.
add
(
"Avail Virtual
M
B"
,
state
.
ullAvailVirtual
/
div
_mb
);
// SL-12122 - Call to GetPerformanceInfo() was removed here. Took
// SL-12122 - Call to GetPerformanceInfo() was removed here. Took
// on order of 10 ms, causing unacceptable frame time spike every
// on order of 10 ms, causing unacceptable frame time spike every
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment