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
146cf041
Commit
146cf041
authored
May 16, 2017
by
Alex Henrie
Committed by
Alexandre Julliard
May 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Always fill PagefileUsage counter with a nonzero value on Linux.
Signed-off-by:
Alex Henrie
<
alexhenrie24@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d6dfe197
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
+12
-4
process.c
dlls/ntdll/process.c
+4
-1
info.c
dlls/ntdll/tests/info.c
+2
-0
process.c
server/process.c
+4
-1
protocol.def
server/protocol.def
+2
-2
No files found.
dlls/ntdll/process.c
View file @
146cf041
...
...
@@ -152,9 +152,12 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
pvmi
->
PeakWorkingSetSize
=
(
ULONG64
)
value
*
1024
;
else
if
(
sscanf
(
line
,
"VmRSS: %lu"
,
&
value
))
pvmi
->
WorkingSetSize
=
(
ULONG64
)
value
*
1024
;
else
if
(
sscanf
(
line
,
"RssAnon: %lu"
,
&
value
))
pvmi
->
PagefileUsage
+=
(
ULONG64
)
value
*
1024
;
else
if
(
sscanf
(
line
,
"VmSwap: %lu"
,
&
value
))
pvmi
->
P
eakPagefileUsage
=
pvmi
->
PagefileUsage
=
(
ULONG64
)
value
*
1024
;
pvmi
->
P
agefileUsage
+
=
(
ULONG64
)
value
*
1024
;
}
pvmi
->
PeakPagefileUsage
=
pvmi
->
PagefileUsage
;
fclose
(
f
);
}
...
...
dlls/ntdll/tests/info.c
View file @
146cf041
...
...
@@ -1096,6 +1096,7 @@ static void test_query_process_vm(void)
/* Check if we have some return values */
dump_vm_counters
(
"VM counters for GetCurrentProcess"
,
&
pvi
);
ok
(
pvi
.
WorkingSetSize
>
0
,
"Expected a WorkingSetSize > 0
\n
"
);
ok
(
pvi
.
PagefileUsage
>
0
,
"Expected a PagefileUsage > 0
\n
"
);
process
=
OpenProcess
(
PROCESS_VM_READ
,
FALSE
,
GetCurrentProcessId
());
status
=
pNtQueryInformationProcess
(
process
,
ProcessVmCounters
,
&
pvi
,
sizeof
(
pvi
),
NULL
);
...
...
@@ -1115,6 +1116,7 @@ static void test_query_process_vm(void)
/* Check if we have some return values */
dump_vm_counters
(
"VM counters for GetCurrentProcessId"
,
&
pvi
);
ok
(
pvi
.
WorkingSetSize
>
0
,
"Expected a WorkingSetSize > 0
\n
"
);
ok
(
pvi
.
PagefileUsage
>
0
,
"Expected a PagefileUsage > 0
\n
"
);
CloseHandle
(
process
);
}
...
...
server/process.c
View file @
146cf041
...
...
@@ -1397,9 +1397,12 @@ DECL_HANDLER(get_process_vm_counters)
reply
->
peak_working_set_size
=
(
mem_size_t
)
value
*
1024
;
else
if
(
sscanf
(
line
,
"VmRSS: %lu"
,
&
value
))
reply
->
working_set_size
=
(
mem_size_t
)
value
*
1024
;
else
if
(
sscanf
(
line
,
"RssAnon: %lu"
,
&
value
))
reply
->
pagefile_usage
+=
(
mem_size_t
)
value
*
1024
;
else
if
(
sscanf
(
line
,
"VmSwap: %lu"
,
&
value
))
reply
->
p
eak_pagefile_usage
=
reply
->
pagefile_usage
=
(
mem_size_t
)
value
*
1024
;
reply
->
p
agefile_usage
+
=
(
mem_size_t
)
value
*
1024
;
}
reply
->
peak_pagefile_usage
=
reply
->
pagefile_usage
;
fclose
(
f
);
}
else
set_error
(
STATUS_ACCESS_DENIED
);
...
...
server/protocol.def
View file @
146cf041
...
...
@@ -853,8 +853,8 @@ struct rawinput_device
mem_size_t virtual_size; /* virtual memory in bytes */
mem_size_t peak_working_set_size; /* peak real memory in bytes */
mem_size_t working_set_size; /* real memory in bytes */
mem_size_t pagefile_usage; /*
swapped-out memory
in bytes */
mem_size_t peak_pagefile_usage; /* peak
swapped-out memory
in bytes */
mem_size_t pagefile_usage; /*
commit charge
in bytes */
mem_size_t peak_pagefile_usage; /* peak
commit charge
in bytes */
@END
...
...
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