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


 > From: Jason R Thorpe <thorpej at wasabisystems dot com>
 > 
 > On Mon, Feb 24, 2003 at 06:22:41PM -0500, Kaveh R. Ghazi wrote:
 > 
 >  > Do any of open/free/net BSD support >4GB ?
 > 
 > For NetBSD, depends on the architecture.  >4GB is supported on the Alpha
 > platform, but not on ia32.
 > 
 > This is a known problem with the BSD hw.physmem MIB node.  I will work on
 > a proposal for a fixed MIB node and propose it on the bsd-api-discuss
 > mailing list (a mailing list hosted by Wasabi Systems which is used to
 > coordinate these kinds of API changes among the different BSD systems).

The polymorphic data is returned in a void* right?  Why not just
change the result from HW_PHYSMEM et al to a size_t instead of
unsigned int?  Systems that support >4G should already set size_t to a
64bit type and could return the correct value if `len' == 8.

Alternatively, we can try using mib[] = { CTL_VM, VM_METER } which I
believe returns values in pages.  But I don't know if that works on
all the BSDs and Darwin.

		--Kaveh
--
Kaveh R. Ghazi			ghazi at caip dot rutgers dot edu


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