distinguish between Maxmem, realmem, physmem
John Baldwin
jhb at freebsd.org
Thu Jun 28 14:09:14 UTC 2012
On Tuesday, June 26, 2012 3:41:10 pm Ping Chen wrote:
> Hi,
> I am a bit confused with all these variables defined in
freebsd(especially in freebsd 6.1): Which one of this represents the real
memory of a system? Say we bought a system with 4G ram, which one tells me the
RAM is 4G?
>
> Accordign to source code:
>
> Maxmem ==> the highest page of phisycal address page : if I understand
correctly, this is the highest page number of physical memory that is usable?
>
> realMem --> somehow get assigned by realmem = Maxmem: this is confuing, if
they are the same, why bother a realmem variables
I think realMem is legacy.
> physmem --> the number of usage pages : this seems the right one extract the
memory info, however, it seems system allocate portion of memory to messge
buffer which makes this physmem < 4G (assume RAM is 4G)
Correct. Note that the firmware can also take up part of RAM as well (e.g. to
hold ACPI tables).
--
John Baldwin
More information about the freebsd-hackers
mailing list