porting an app that checks /proc/meminfo

Brooks Davis brooks at one-eyed-alien.net
Tue Jan 24 18:03:01 PST 2006


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. 
> >
> ...
> >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? 
> 
> 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

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20060124/2f4e59bf/attachment-0001.bin


More information about the freebsd-ports mailing list