[ale] What does the "shared" mean in the ouput of free

Joseph A Knapka jknapka at earthlink.net
Sat Mar 23 12:44:07 EST 2002


hirsch at zapmedia.com wrote:
> 
> When I run the command 'free' I get something like this:
> 
>              total       used       free     shared    buffers     cached
> Mem:        110600     109180       1420          0       8772      27780
> -/+ buffers/cache:      72628      37972
> Swap:       131504        480     131024
> 
> What exactly does "shared" mean?  Is that only memory shared between
> processes using shared memory, or does it count libraries that are
> shared between programs?

I am pretty sure that "shared" counts only SyxV shared memory
mappings, not generic sharing of mmapped files.

> On my laptop I have 128 MB of RAM and I'm swapping like crazy.  I'm
> running KDE which is large, but I thought that since almost all my
> applications are KDE applications they should share a lot.  Instead I
> get almost no "share"d memory.
> 
> Am I misunderstanding the meaning of share?

I think so. At the very minumum, everything dynamically linked
to libc.so (which means pretty much everything - annoyingly,
even vital stuff like "mv" and "ls" is dynamically linked on
some distributions) will share all the pages they use in that
lib.

Just curious, what kernel version are you running? It doesn't
look like you should be swapping too much with the numbers
you give above; does vmstat show a lot of swap activity?

Cheers,

-- 
  Using open-source software: free.
  Pissing Bill Gates off: priceless.

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list