Subject: Re: 200206130000 pre-1.6 snapshot: sysinst troubles on >= 2GB
To: Perry E. Metzger <perry@wasabisystems.com>
From: Matt Thomas <matt@3am-software.com>
List: tech-install
Date: 06/15/2002 00:10:33
At 10:16 PM 6/14/2002, Perry E. Metzger wrote:

>jtc@acorntoolworks.com (J.T. Conklin) writes:
> > It appears that get_ramsize() botches the calculation of amount of
> > memory free, which causes no end of trouble when the value is used
> > to derrive other values (like partition table defaults).
> >
> > Because ramsize is a long, the expression that computes rammb over-
> > flows on my 2GB machine.  ramsize itself starts out overflowed on >
> > 2GB machines.
>
>Hmm. For what it is worth, I'm not clear on whether the HW_PHYSMEM
>sysctl does the right thing in the first place. sysctl doesn't seem to
>have much of a concept of types other than some vague "integer".
>
>Furthermore, physmem itself, in systm.h, is defined as an int, not as
>an unsigned value (or better yet, some better type still, as even on
>an i386 technically more than 4G of RAM are possible).

Except physmem is the number of physical pages so we are safe
until we have machines with >8TB of ram.  It should be unsigned
though.  I had to add casts to macppc to make it deal properly
with >2GB of RAM and physmem.


-- 
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Cupertino, CA             Disclaimer: I avow all knowledge of this message