DaemonForums  

Go Back   DaemonForums > Other Operating Systems > Other BSD and UNIX/UNIX-like

Other BSD and UNIX/UNIX-like Any other flavour of BSD or UNIX that does not have a section of its own.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 26th October 2012
thirdm thirdm is offline
Spam Deminer
 
Join Date: May 2009
Posts: 248
Default 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?
Reply With Quote
  #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
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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 09:36 PM
X - Virtual screen too big for memory backrow OpenBSD General 1 4th July 2009 07: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 08:44 PM


All times are GMT. The time now is 11:01 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick