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
c67c50f2
Commit
c67c50f2
authored
Oct 31, 2021
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Nov 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement vm counters on FreeBSD.
Signed-off-by:
Damjan Jovanovic
<
damjan.jov@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
26d8701a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
process.c
dlls/ntdll/unix/process.c
+39
-0
No files found.
dlls/ntdll/unix/process.c
View file @
c67c50f2
...
...
@@ -46,6 +46,21 @@
#ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif
#ifdef HAVE_SYS_SYSCTL_H
# include <sys/sysctl.h>
#endif
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#ifdef HAVE_SYS_QUEUE_H
# include <sys/queue.h>
#endif
#ifdef HAVE_SYS_USER_H
# include <sys/user.h>
#endif
#ifdef HAVE_LIBPROCSTAT_H
# include <libprocstat.h>
#endif
#include <unistd.h>
#ifdef HAVE_MACH_MACH_H
# include <mach/mach.h>
...
...
@@ -1002,6 +1017,30 @@ void fill_vm_counters( VM_COUNTERS_EX *pvmi, int unix_pid )
fclose
(
f
);
}
#elif defined(HAVE_LIBPROCSTAT)
void
fill_vm_counters
(
VM_COUNTERS_EX
*
pvmi
,
int
unix_pid
)
{
struct
procstat
*
pstat
;
struct
kinfo_proc
*
kip
;
unsigned
int
proc_count
;
pstat
=
procstat_open_sysctl
();
if
(
pstat
)
{
kip
=
procstat_getprocs
(
pstat
,
KERN_PROC_PID
,
unix_pid
==
-
1
?
getpid
()
:
unix_pid
,
&
proc_count
);
if
(
kip
)
{
pvmi
->
VirtualSize
=
kip
->
ki_size
;
pvmi
->
PeakVirtualSize
=
kip
->
ki_size
;
pvmi
->
WorkingSetSize
=
kip
->
ki_rssize
<<
PAGE_SHIFT
;
pvmi
->
PeakWorkingSetSize
=
kip
->
ki_rusage
.
ru_maxrss
*
1024
;
procstat_freeprocs
(
pstat
,
kip
);
}
procstat_close
(
pstat
);
}
}
#else
void
fill_vm_counters
(
VM_COUNTERS_EX
*
pvmi
,
int
unix_pid
)
...
...
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