Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
db2ac542
Commit
db2ac542
authored
Feb 18, 2016
by
Martin Schultz
Browse files
changed memory info computation on osx
meminfo should be as accurate as around 100mb
parent
518cfe30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Utils/Memory/RAMInfo.cc
View file @
db2ac542
...
...
@@ -40,6 +40,8 @@
\*===========================================================================*/
#include
"RAMInfo.hh"
#include
<QString>
#include
<stdio.h>
// Main Memory information
...
...
@@ -134,7 +136,8 @@ namespace Utils
}
// retrieve free memory
_outMemoryVacancy
.
totalRamMB
=
physical_memory
/
1024
/
1024
;
_outMemoryVacancy
.
freeRamMB
=
(
long
)(
vmstat
.
free_count
+
vmstat
.
inactive_count
)
*
PAGE_SIZE
/
1024
/
1024
;
unsigned
long
active
=
vmstat
.
active_count
*
PAGE_SIZE
/
1024
/
1024
;
_outMemoryVacancy
.
freeRamMB
=
_outMemoryVacancy
.
totalRamMB
-
active
;
_outMemoryVacancy
.
bufferRamMB
=
0
;
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment