shmmax tops out at 2G?

Nate Eldredge neldredge at math.ucsd.edu
Tue Feb 24 00:26:51 PST 2009


On Tue, 24 Feb 2009, Garrett Cooper wrote:

> On Mon, Feb 23, 2009 at 12:16 PM, Bill Moran <wmoran at potentialtech.com> wrote:
>> In response to Christian Peron <csjp at freebsd.org>:
>>
>>> On Mon, Feb 23, 2009 at 11:58:09AM -0800, Garrett Cooper wrote:
>>> [..]
>>>>
>>>>     Why isn't the field an unsigned int / size_t? I don't see much value
>>>> in having the size be signed...
>>>
>>> No idea :) This code long predates me.
>>
>> It's that way because the original Sun spec for the API said so.
>>
>> It makes little sense to change it just to unsigned.  The additional 2G
>> it would give doesn't really solve the tuning problem on a 64G system.
>> This is simply a spec that has become outdated by modern hardware.
>
> Ah, but an unsigned integer on a 64-bit system supports that kind of
> precision ;). Or are you saying you're crazy enough to run PAE mode
> with that much RAM 0-o?

int and unsigned on amd64 are 32-bit types.  To get a 64-bit integer, you 
need (unsigned) long.

-- 

Nate Eldredge
neldredge at math.ucsd.edu


More information about the freebsd-hackers mailing list