diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2003-11-15 04:08:22 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2003-11-15 04:08:22 +0800 |
commit | f3ba293a22501795f4fc0c820df90449fed3a045 (patch) | |
tree | 03fad67a274cd8c997d5e193c5945de643cedfe6 /devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c | |
parent | d36bc2ee666da712d89569dfb5e079d6281c5044 (diff) | |
download | marcuscom-ports-f3ba293a22501795f4fc0c820df90449fed3a045.tar marcuscom-ports-f3ba293a22501795f4fc0c820df90449fed3a045.tar.gz marcuscom-ports-f3ba293a22501795f4fc0c820df90449fed3a045.tar.bz2 marcuscom-ports-f3ba293a22501795f4fc0c820df90449fed3a045.tar.lz marcuscom-ports-f3ba293a22501795f4fc0c820df90449fed3a045.tar.xz marcuscom-ports-f3ba293a22501795f4fc0c820df90449fed3a045.tar.zst marcuscom-ports-f3ba293a22501795f4fc0c820df90449fed3a045.zip |
Update to 2.5.0.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@1330 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c')
-rw-r--r-- | devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c b/devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c new file mode 100644 index 000000000..a174fda33 --- /dev/null +++ b/devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c @@ -0,0 +1,40 @@ +--- sysdeps/freebsd/procmem.c.orig Fri May 28 03:56:49 1999 ++++ sysdeps/freebsd/procmem.c Sun Sep 7 21:37:38 2003 +@@ -137,6 +137,23 @@ + return; + } + ++#if __FreeBSD_version >= 500013 ++ ++#define XXX_P_VMSPACE ki_vmspace ++ ++ buf->rss_rlim = pinfo [0].ki_rssize; ++ ++ buf->vsize = (u_int64_t) pinfo [0].ki_size; ++ buf->size = (u_int64_t) pagetok ++ (pinfo [0].ki_tsize + pinfo [0].ki_dsize + pinfo[0].ki_ssize) ++ << LOG1024; ++ buf->resident = buf->rss = (u_int64_t) pagetok ++ (pinfo [0].ki_rssize) << LOG1024; ++ ++#else ++ ++#define XXX_P_VMSPACE kp_proc.p_vmspace ++ + if (kvm_read (server->machine.kd, + (unsigned long) pinfo [0].kp_proc.p_limit, + (char *) &plimit, sizeof (plimit)) != sizeof (plimit)) { +@@ -154,11 +171,12 @@ + + buf->resident = buf->rss = (u_int64_t) pagetok + (vms->vm_rssize) << LOG1024; ++#endif + + /* Now we get the shared memory. */ + + if (kvm_read (server->machine.kd, +- (unsigned long) pinfo [0].kp_proc.p_vmspace, ++ (unsigned long) pinfo [0].XXX_P_VMSPACE, + (char *) &vmspace, sizeof (vmspace)) != sizeof (vmspace)) { + glibtop_warn_io_r (server, "kvm_read (vmspace)"); + return; |