apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: LP64/P64 model API issue #2
Date Thu, 19 May 2005 05:23:04 GMT
William A. Rowe, Jr. wrote:

>>size_t is an unsigned integral type that holds the value
>>of a sizeof operation. The relationship you mention 
>>need not be true on a 64-bit platform.
>There you are wrong - as I've been posting about LP64 or P64
>architectures (such as Win64).
Um. Even on those architectures, size_t can be smaller than ptrdiff_t. 
the size_t type mus be able to hold the size of the largest object (or 
"allocated block of memory") allowed by a platform, and it's quite 
possible that's smaller than the size of addressable memory. I wouldn't 
be surprised if, on an (L)P64 architecture, sizeof(size_t) == 
sizeof(int) (but sizeof(ptrdiff_t) == sizeof(void*)).

-- Brane

View raw message