Re: making sdirno an int8_t

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 01 Aug 2000 22:54:08 +0200

Duane Wessels wrote:

> Yes, I certainly know that long and time_t are 64 bits on Alpha and
> other systems. But my Alphas (DUNIX) always report:
>
> checking size of int... 4

Hmm.. I must have been a bit confused here.. you are correct.

> I can't ever recall seeing a system where sizeof(int) != 4.

I do. Have seen several old systems where sizeof(int) == 2... none of
these has been running UNIX, or close to being candidates for Squid
however. But still, there is nothing in any standard which says that int
is 32 bits. If we are selecting field sizes optimizing for memory use,
then I think that types with a well defined size should be used, not
types which "incidentally" happens to have the desired size on all known
systems.

My original intent for the sdirno and sfileno fields was to have these
configurable (at build time), to adopt for different setups/uses. The
optimal setup is to have a name space just large enought, and since this
is multiplied with every object in the cache even one byte difference is
quite a lot.

/Henrik
Received on Tue Aug 01 2000 - 14:56:56 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:33 MST