summaryrefslogtreecommitdiffstats
path: root/lib/libprocstat/libprocstat.3
diff options
context:
space:
mode:
authortrociny <trociny@FreeBSD.org>2013-04-20 07:49:35 +0000
committertrociny <trociny@FreeBSD.org>2013-04-20 07:49:35 +0000
commit08b1137c14b2ad1dd61b67f218f6438e0ca54780 (patch)
tree10d242826932cd7fe16d4b323cb7306ef42d628b /lib/libprocstat/libprocstat.3
parent16ea6280bfe1e44cbde69ee9e5bf59725bf0853c (diff)
downloadFreeBSD-src-08b1137c14b2ad1dd61b67f218f6438e0ca54780.zip
FreeBSD-src-08b1137c14b2ad1dd61b67f218f6438e0ca54780.tar.gz
Add procstat_getvmmap function to get VM layout of a process.
MFC after: 1 month
Diffstat (limited to 'lib/libprocstat/libprocstat.3')
-rw-r--r--lib/libprocstat/libprocstat.329
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/libprocstat/libprocstat.3 b/lib/libprocstat/libprocstat.3
index a64376c..18dc1e9 100644
--- a/lib/libprocstat/libprocstat.3
+++ b/lib/libprocstat/libprocstat.3
@@ -34,8 +34,10 @@
.Nm procstat_close ,
.Nm procstat_getfiles ,
.Nm procstat_getprocs ,
+.Nm procstat_getvmmap ,
.Nm procstat_freefiles ,
.Nm procstat_freeprocs ,
+.Nm procstat_freevmmap ,
.Nm procstat_get_pipe_info ,
.Nm procstat_get_pts_info ,
.Nm procstat_get_shm_info ,
@@ -57,6 +59,11 @@
.Fc
.Ft void
.Fn procstat_freeprocs "struct procstat *procstat" "struct kinfo_proc *p"
+.Ft void
+.Fo procstat_freevmmap
+.Fa "struct procstat *procstat"
+.Fa "struct kinfo_vmentry *vmmap"
+.Fc
.Ft int
.Fo procstat_get_pipe_info
.Fa "struct procstat *procstat"
@@ -105,6 +112,12 @@
.Fa "int arg"
.Fa "unsigned int *count"
.Fc
+.Ft "struct kinfo_vmentry *"
+.Fo procstat_getvmmap
+.Fa "struct procstat *procstat"
+.Fa "struct kinfo_proc *kp"
+.Fa "unsigned int *count"
+.Fc
.Ft "struct procstat *"
.Fn procstat_open_core "const char *filename"
.Ft "struct procstat *"
@@ -214,6 +227,22 @@ The caller is responsible to free the allocated memory with a subsequent
function call.
.Pp
The
+.Fn procstat_getvmmap
+function gets a pointer to the
+.Vt procstat
+structure initialized with one of the
+.Fn procstat_open_*
+functions, a pointer to
+.Vt kinfo_proc
+structure, and returns VM layout of the process as a dynamically allocated
+array of
+.Vt kinfo_vmentry
+structures.
+The caller is responsible to free the allocated memory with a subsequent
+.Fn procstat_freevmmap
+function call.
+.Pp
+The
.Fn procstat_get_pipe_info ,
.Fn procstat_get_pts_info ,
.Fn procstat_get_shm_info ,
OpenPOWER on IntegriCloud