Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e41135a4
Commit
e41135a4
authored
Jan 22, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
Jan 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use MemAvailable field for free RAM estimation if available.
parent
605ecafa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
system.c
dlls/ntdll/unix/system.c
+4
-1
No files found.
dlls/ntdll/unix/system.c
View file @
e41135a4
...
...
@@ -1885,7 +1885,7 @@ static void get_performance_info( SYSTEM_PERFORMANCE_INFORMATION *info )
if
((
fp
=
fopen
(
"/proc/meminfo"
,
"r"
)))
{
unsigned
long
long
value
;
unsigned
long
long
value
,
mem_available
=
0
;
char
line
[
64
];
while
(
fgets
(
line
,
sizeof
(
line
),
fp
))
...
...
@@ -1902,8 +1902,11 @@ static void get_performance_info( SYSTEM_PERFORMANCE_INFORMATION *info )
freeram
+=
value
*
1024
;
else
if
(
sscanf
(
line
,
"Cached: %llu"
,
&
value
))
freeram
+=
value
*
1024
;
else
if
(
sscanf
(
line
,
"MemAvailable: %llu"
,
&
value
))
mem_available
=
value
*
1024
;
}
fclose
(
fp
);
if
(
mem_available
)
freeram
=
mem_available
;
}
}
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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