From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 26 19:44:55 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C109D1065672 for ; Tue, 26 Jun 2012 19:44:55 +0000 (UTC) (envelope-from pchen@juniper.net) Received: from exprod7og127.obsmtp.com (exprod7og127.obsmtp.com [64.18.2.210]) by mx1.freebsd.org (Postfix) with ESMTP id 5F8C08FC19 for ; Tue, 26 Jun 2012 19:44:55 +0000 (UTC) Received: from P-EMHUB02-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob127.postini.com ([64.18.6.12]) with SMTP ID DSNKT+oRN3/kAzOe4I7l6nzR+mDcDirgzF/k@postini.com; Tue, 26 Jun 2012 12:44:55 PDT Received: from P-CLDFE01-HQ.jnpr.net (172.24.192.59) by P-EMHUB02-HQ.jnpr.net (172.24.192.36) with Microsoft SMTP Server (TLS) id 8.3.213.0; Tue, 26 Jun 2012 12:41:17 -0700 Received: from p-emfe02-wf.jnpr.net (172.28.145.25) by p-cldfe01-hq.jnpr.net (172.24.192.59) with Microsoft SMTP Server (TLS) id 14.1.355.2; Tue, 26 Jun 2012 12:41:17 -0700 Received: from EMBX01-WF.jnpr.net ([fe80::1914:3299:33d9:e43b]) by p-emfe02-wf.jnpr.net ([fe80::c126:c633:d2dc:8090%11]) with mapi; Tue, 26 Jun 2012 15:41:16 -0400 From: Ping Chen To: "freebsd-hackers@freebsd.org" Date: Tue, 26 Jun 2012 15:41:10 -0400 Thread-Topic: distinguish between Maxmem, realmem, physmem Thread-Index: Ac1T06L9N1QGaOrgR22jsLVqzNDeZg== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-cr-puzzleid: {454BBE41-AFA6-4C29-9F0D-3B4183A5041B} x-cr-hashedpuzzle: AvJf BRdO CjMo ECSj Fli1 F59r GcIj HFP/ HlR6 H8tL Isec J3G/ KKvr KaDR Kl+8 LAhW; 1; ZgByAGUAZQBiAHMAZAAtAGgAYQBjAGsAZQByAHMAQABmAHIAZQBlAGIAcwBkAC4AbwByAGcA; Sosha1_v1; 7; {454BBE41-AFA6-4C29-9F0D-3B4183A5041B}; cABjAGgAZQBuAEAAagB1AG4AaQBwAGUAcgAuAG4AZQB0AA==; Tue, 26 Jun 2012 19:41:10 GMT; ZABpAHMAdABpAG4AZwB1AGkAcwBoACAAYgBlAHQAdwBlAGUAbgAgAE0AYQB4AG0AZQBtACwAIAByAGUAYQBsAG0AZQBtACwAIABwAGgAeQBzAG0AZQBtAA== acceptlanguage: en-US MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 26 Jun 2012 20:38:06 +0000 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: distinguish between Maxmem, realmem, physmem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2012 19:44:55 -0000 Hi, I am a bit confused with all these variables defined in freebsd(especial= ly in freebsd 6.1): Which one of this represents the real memory of a syste= m? Say we bought a system with 4G ram, which one tells me the RAM is 4G? Accordign to source code: Maxmem =3D=3D> the highest page of phisycal address page : if I understand= correctly, this is the highest page number of physical memory that is usab= le? realMem --> somehow get assigned by realmem =3D Maxmem: this is confuing, = if they are the same, why bother a realmem variables physmem --> the number of usage pages : this seems the right one extract th= e memory info, however, it seems system allocate portion of memory to messg= e buffer which makes this physmem < 4G (assume RAM is 4G) Could someone explains more? Thanks Ping