Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
bf7a97e5
Commit
bf7a97e5
authored
Mar 20, 2017
by
Alex Henrie
Committed by
Alexandre Julliard
Mar 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement ProcessVmCounters for Linux.
Signed-off-by:
Alex Henrie
<
alexhenrie24@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
08ea8280
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
4 deletions
+29
-4
process.c
dlls/ntdll/process.c
+28
-0
info.c
dlls/ntdll/tests/info.c
+1
-4
No files found.
dlls/ntdll/process.c
View file @
bf7a97e5
...
...
@@ -131,6 +131,34 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
#endif
}
#elif defined(linux)
static
void
fill_VM_COUNTERS
(
VM_COUNTERS
*
pvmi
)
{
FILE
*
f
;
char
line
[
256
];
unsigned
long
value
;
f
=
fopen
(
"/proc/self/status"
,
"r"
);
if
(
!
f
)
return
;
while
(
fgets
(
line
,
sizeof
(
line
),
f
))
{
if
(
sscanf
(
line
,
"VmPeak: %lu"
,
&
value
))
pvmi
->
PeakVirtualSize
=
(
ULONG64
)
value
*
1024
;
else
if
(
sscanf
(
line
,
"VmSize: %lu"
,
&
value
))
pvmi
->
VirtualSize
=
(
ULONG64
)
value
*
1024
;
else
if
(
sscanf
(
line
,
"VmHWM: %lu"
,
&
value
))
pvmi
->
PeakWorkingSetSize
=
(
ULONG64
)
value
*
1024
;
else
if
(
sscanf
(
line
,
"VmRSS: %lu"
,
&
value
))
pvmi
->
WorkingSetSize
=
(
ULONG64
)
value
*
1024
;
else
if
(
sscanf
(
line
,
"VmSwap: %lu"
,
&
value
))
pvmi
->
PeakPagefileUsage
=
pvmi
->
PagefileUsage
=
(
ULONG64
)
value
*
1024
;
}
fclose
(
f
);
}
#else
static
void
fill_VM_COUNTERS
(
VM_COUNTERS
*
pvmi
)
...
...
dlls/ntdll/tests/info.c
View file @
bf7a97e5
...
...
@@ -1078,10 +1078,7 @@ static void test_query_process_vm(void)
/* Check if we have some return values */
trace
(
"WorkingSetSize : %ld
\n
"
,
pvi
.
WorkingSetSize
);
todo_wine
{
ok
(
pvi
.
WorkingSetSize
>
0
,
"Expected a WorkingSetSize > 0
\n
"
);
}
ok
(
pvi
.
WorkingSetSize
>
0
,
"Expected a WorkingSetSize > 0
\n
"
);
}
static
void
test_query_process_io
(
void
)
...
...
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