From owner-freebsd-ports@FreeBSD.ORG Wed Jan 25 02:03:00 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E68C916A41F for ; Wed, 25 Jan 2006 02:03:00 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 755A743D45 for ; Wed, 25 Jan 2006 02:03:00 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id k0P22xCm015319; Tue, 24 Jan 2006 18:02:59 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id k0P22xCp015318; Tue, 24 Jan 2006 18:02:59 -0800 Date: Tue, 24 Jan 2006 18:02:59 -0800 From: Brooks Davis To: Rainer Alves Message-ID: <20060125020259.GB5928@odin.ac.hmc.edu> References: <20060124172317.GF72149@iib.unsam.edu.ar> <43D66A69.4010005@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bCsyhTFzCvuiizWE" Content-Disposition: inline In-Reply-To: <43D66A69.4010005@gmail.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-ports@freebsd.org Subject: Re: porting an app that checks /proc/meminfo X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2006 02:03:01 -0000 --bCsyhTFzCvuiizWE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 24, 2006 at 03:56:57PM -0200, Rainer Alves wrote: > Fernan Aguero wrote: > >The program builds fine, but because it uses /proc/meminfo > >to check for available memory, when you run it, it will > >complain about the lack of /proc/meminfo and won't let you > >do anything.=20 > > > ... > >How does one gets the values of i) memory used by the > >program/process and ii) amount of RAM available in the > >computer without using /proc/meminfo in FreeBSD?=20 >=20 > Take a loot at sysutils/muse, which uses /dev/mem to gather this info: Please don't do this. Really! There's no point in gratuitously groveling around in the kernel's live memory image to get data you have access to via unprivileged calls. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --bCsyhTFzCvuiizWE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFD1txSXY6L6fI4GtQRAq8vAJ4+H8pHB4BdFOGMz7llQ7LzVSe0sACfW9r8 A+SjVPe5QnnrC9IlWMR/TFk= =rqpF -----END PGP SIGNATURE----- --bCsyhTFzCvuiizWE--