[Gc] gc7 and 64-bit platforms
pcolson at connexus.net.au
Tue Nov 16 16:02:45 PST 2004
On 17/11/2004, at 10:06 AM, Richard A. O'Keefe wrote:
> MenTaLguY <mental at rydia.net> wrote:
> What platform and compiler is this? I'm fairly certain that,
> to the language specification, sizeof(size_t) =3D=3D sizeof(void *)...
> Don't be certain of it, because the language specification says no
> such thing.
> And it couldn't, because in some compilation modes on MS-DOS it wasn't
> Size_t has to be big enough to hold the size of the largest object you
> allocate. In some MS-DOS compilation modes, pointers were 32 bits,
> but each
> object had to fit in a single segment, which meant that size_t was 16
> Then consider AS/400, where pointers were huge (128 bits)
> but size_t was 32 bits. On AS/400, there was *no* integral type the
> size as a void*.
> Or consider the PRIME computers, where pointers were 48 bits, but there
> was no 48-bit integral type.
> We're not even guaranteed that ptrdiff_t is big enough to hold a void*.
> C99 added intptr_t and uintptr_t, or was going to. I don't know what
> they decided to do about machines like AS/400 and PRIME where pointers
> were bigger than any hardware integer type.
(u)intptr_t aren't defined it seems.
BTW pointers can be 8-bytes on the 400 using teraspace options with the
ILE/C compiler. That gives the opportunity of storing them in an
unsigned long long.
More information about the Gc