View Single Post
  #2   (View Single Post)  
Old 29th October 2012
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 429
Default

OpenBSD-CURRENT:

/usr/src/usr.bin/top/machine.c:
/* what we consider to be process size: */
#define PROCSIZE(pp) ((pp)->p_vm_tsize + (pp)->p_vm_dsize + (pp)->p_vm_ssize)

/usr/src/sys/sysctl.h:
int32_t p_vm_rssize; /* SEGSZ_T: current resident set size in pages */
int32_t p_vm_tsize; /* SEGSZ_T: text size (pages) */
int32_t p_vm_dsize; /* SEGSZ_T: data size (pages) */
int32_t p_vm_ssize; /* SEGSZ_T: stack size (pages) */

RES is listed as "resident" size in top's man page, which is simply format_k(pagetok(pp->p_vm_rssize)).

I've seen instances (on OpenBSD-CURRENT) where SIZE > RES and other instances where RES > SIZE. I haven't dug into it enough to understand why that happens...but I probably will now that you've asked.
__________________
Linux/Network-Security Engineer by Profession. OpenBSD user by choice.
Reply With Quote