From 0425a0231ae3b44afcbeb0c5b7ab57bb2ca645d0 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Tue, 23 Jan 2007 16:59:41 +0000 Subject: [PATCH] Fix proc_mem.size on HP-UX --- ChangeLog | 5 +++++ src/os/hpux/hpux_sigar.c | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index f18da019..45f5864c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-01-22 Doug MacEachern + + * Fix proc_mem.size on HP-UX + Submitted by: Ragnar + 2007-01-22 Doug MacEachern * [SIGAR-32] Fix FileTail on Windows diff --git a/src/os/hpux/hpux_sigar.c b/src/os/hpux/hpux_sigar.c index 94a7b0cf..5f89d378 100644 --- a/src/os/hpux/hpux_sigar.c +++ b/src/os/hpux/hpux_sigar.c @@ -284,15 +284,19 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid, } procmem->size = - pinfo->pst_tsize + /* text */ - pinfo->pst_dsize + /* data */ - pinfo->pst_ssize; /* stack */ + pinfo->pst_vtsize + /* text */ + pinfo->pst_vdsize + /* data */ + pinfo->pst_vssize + /* stack */ + pinfo->pst_vshmsize + /* shared memory */ + pinfo->pst_vmmsize + /* mem-mapped files */ + pinfo->pst_vusize + /* U-Area & K-Stack */ + pinfo->pst_viosize; /* I/O dev mapping */ procmem->size *= pagesize; procmem->resident = pinfo->pst_rssize * pagesize; - procmem->share = pinfo->pst_shmsize * pagesize; + procmem->share = pinfo->pst_vshmsize * pagesize; procmem->minor_faults = pinfo->pst_minorfaults; procmem->major_faults = pinfo->pst_majorfaults;