On ons, 2008-04-30 at 23:51 +1200, Amos Jeffries wrote:
> size_t is named to describe its use. It's unsigned to record the length
> of things.
> IIRC there is a different contextual meaning in squid. Hopefully one of
> the others can tell us both what.
It's also 64-bits on 64-bit platforms, where int is 32-bits and can't
hold as large number as one can allocate consecutive memory regions...
But as you say, the biggest factor is semantics. size_t is size of some
memory region (physical or virtual).
ssize_t is similar, but only used for return results where -1 may be
returned... (signed)
off_t is their cousin, but for positions/ranges in files instead of
memory regions.
In squid-2 we also have squid_off_t which is for object
positions/ranges. In Squid-3 int64_t is used for this purpose.
Regards
Henrik
Received on Fri May 02 2008 - 16:28:20 MDT
This archive was generated by hypermail 2.2.0 : Tue May 13 2008 - 12:00:04 MDT