Subject: Re: more infos about UVM
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 11/06/2006 01:54:51
> The difference between "total memory" and "avail memory" is the
> kernel size. But my values don't match :
> # dmesg | grep memory
> total memory = 188 MB
> avail memory = 184 MB
> # ll /netbsd
> -rwxr-xr-x  1 root  wheel  3.0M Apr 22  2006 /netbsd*
> What is the 1MB missing used for ?

There may be no "1MB missing"; I think the values in dmesg are rounded
down, in which case the actual memory used by the kernel could be
anywhere 3+epsilon to 5-epsilon MB.

Furthermore, kernel BSS occupies very little space in the executable
(the size of a section header, I think), whereas when the kernel is
loaded it gets expanded.  Check with "size /netbsd".  (size still won't
tell you the whole story, because it doesn't include the symbol table,
which I think gets saved in core at run-time.)

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B