Date: Tue, 24 Jan 2006 18:02:59 -0800 From: Brooks Davis <brooks@one-eyed-alien.net> To: Rainer Alves <rainer.alves@gmail.com> Cc: freebsd-ports@freebsd.org Subject: Re: porting an app that checks /proc/meminfo Message-ID: <20060125020259.GB5928@odin.ac.hmc.edu> In-Reply-To: <43D66A69.4010005@gmail.com> References: <20060124172317.GF72149@iib.unsam.edu.ar> <43D66A69.4010005@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060125020259.GB5928>