This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: *bsd & darwin support in libiberty/physmem.c


On Mon, Feb 24, 2003 at 09:01:59PM -0500, Kaveh R. Ghazi wrote:

 > So the bsd stuff in top-3.5beta12/machine/m_*bsd*.c doesn't work?
 > E.g. vmtotal.t_rm ?

*shrug*  NetBSD maintains its own version of top.  Internally, we translate
our "uvmexp" structure into an old-style vmtotal structure when something
asks for the vmtotals.  New code is supposed to use the uvmexp structure.

(Note, "t_rm" is "total real memory in use", not "total real memory".)

Naturally, FreeBSD does not have a uvmexp structure, since FreeBSD does
not have the same virtual memory system that NetBSD has (NetBSD completely
replaced the Mach VM-based VM system several years ago), so using uvmexp
is not a portable-across-BSD option.

This is why I suggested a new sysctl MIB node that all of the BSDs could
implement which would properly report memory sizes >=4G (and we could fall
back on the old MIB node if the new one was not available).

On the other hand, I'm happy a "GCC uses the uvmexp sysctl for NetBSD, and
all the other BSDs can figure out how to deal on their own" solution, too.
I can cook up a patch for that tomorrow.

-- 
        -- Jason R. Thorpe <thorpej at wasabisystems dot com>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]