`top` process memory usage: SIZE vs RES

Dan Nelson dnelson at allantgroup.com
Fri Sep 12 10:12:19 PDT 2003


In the last episode (Sep 12), Jesse Guardiani said:
> Dan Nelson wrote:
> > In the last episode (Sep 12), Jesse Guardiani said:
> >> Dan Nelson wrote:
> >> > In the last episode (Sep 11), Jesse Guardiani said:
> >> >  
> >> >> 2.) What, exactly, is RES? `man top` describes it as this:
> >> >>     "RES is the current amount of resident memory", but does
> >> >>     that mean RES is included in SIZE? Or does that mean that
> >> >>     RES should be counted in addition to SIZE?
> >> > 
> >> > RES the amount of SIZE that it currently in core
> >> 
> >> OK. To clarify, you mean core kernel memory here?
> >> If so, how is that significant? Why should I care?
> >> 
> >> In other words, why would I ever want to know that?
> > 
> > core meaning physical memory; user memory in this case.
> 
> OK. And how does core, or user memory differ from SIZE memory
> then? If X = SIZE - RES, where is X stored?

You don't need to store it, since you know SIZE and RES :)  X is any
memory mapped into process space that is not in physical memory at the
moment; it could be dirty or private pages swapped to disk, or program
code that can be pulled from the binary on the filesystem if necessary,
or malloced memory that hasn't been written to yet.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list