virtual size includes shared library memory?
On UNIX and Unix-like systems is there any kind of standard definition for what a process's virtual size (vsz, vm_size, vsize in ps or size in top, depending on system) means in terms of mapped in shared libraries? It seems like it's all over the place. If I remember rightly OpenBSD excludes the shared library memory while other systems include it. At least I recall seeing cases where virtual size was smaller than resident set size on OpenBSD, yet on the NetBSD system in front of me now I see nothing like that. Some looking around on the internet shows no clear answer, but seems to imply that FreeBSD and Linux each define virtual size to include the mapped in shared library memory. I'll have to try to experiment a little with DragonFly when I get home.
What's your experience?
/* what we consider to be process size: */
#define PROCSIZE(pp) ((pp)->p_vm_tsize + (pp)->p_vm_dsize + (pp)->p_vm_ssize)
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 Admin by Profession. OpenBSD user by choice.
|Thread||Thread Starter||Forum||Replies||Last Post|
|Samba 3.5 release includes experimental SMB2 support||J65nko||News||0||3rd March 2010 12:45 AM|
|Shared object not found 'libwrap.so.4'||magic||FreeBSD General||3||22nd July 2009 10:36 PM|
|X - Virtual screen too big for memory||backrow||OpenBSD General||1||4th July 2009 08:22 PM|
|shared libraries and linux emulation||Business_woman||FreeBSD General||4||16th November 2008 10:03 AM|
|What include and shared library directories are searched by gcc||kasse||FreeBSD General||3||16th July 2008 09:44 PM|