Alan Crowe <alan@cawtech.freeserve.co.uk> wrote:
+---------------
| dmesg displays ...
| real memory = 167772160 (163840K bytes)
| avail memory = 158842880 (155120K bytes)
|
| The kernal remembers all this, so you can ask it with sysctl
|
| cawtech$ sysctl hw.physmem
| hw.physmem: 164069376
| cawtech$ sysctl hw.usermem
| hw.usermem: 146206720
|
| I don't know why the numbers don't agree.
+---------------
"hw.physmem" is how much physical memory there is. "hw.usermem" is
how much memory is available for being allocated for various things
like processes, buffer caches, etc. The latter omits memory which has
been "wired down" for one reason or another (such as the kernel itself,
loaded drivers, statically-alloocated tables, etc.), and is not part
of the general system pool. See "/usr/src/sys/i386/i386/machdep.c"
and "/usr/src/sys/i386/i386/pmap.c" in any recent FreeBSD.
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607