NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Why are there physmem and physmem64?



2017-02-18 0:46 GMT+09:00 Thor Lancelot Simon <tls%panix.com@localhost>:
>> but I said earlier, Memory will not be negaive value. why sysctl use
>> singned int?
>
> Because the sysctl MIB is a public API (and ABI) and it was a signed int
> in 4.4BSD.  Applicattions are entitled to make assumptions about the
> possible range of the returned value, and we are not entitled to invalidate
> those assumptions.  That's what "compatibility" means.  Sometimes you are
> stuck with mistakes people made decades ago.
>
> We did consider making exactly this change about 20 years ago, and concluded
> the safe thing to do was to create hw.physmem64 instead.

ok. thanks.
I did not know that such circumstances existed.
By accumulating history, BSD has been maintained.
I will try to understand little by little.

-- 
miwarin


Home | Main Index | Thread Index | Old Index