Different pointer representations on the same machine

Sean Fagan seanf at sco.COM
Sun Feb 19 08:12:15 AEST 1989


In article <1989Feb15.200416.15836 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
>In article <3675 at arcturus> evil at arcturus.UUCP (Wade Guthrie) writes:
>>I have seen references on the net to computers which have different
>>representations for different types of pointers (even some computers
>>which represent different types of pointers as different sizes).
>>
>>Could I have some examples...
[Henry talks about word-addressable machines]

As Henry said, machines like, oh, Crays and Cybers, which are
word-addressible, can stuff more than one char per word, and, for maximum
storage efficiency, you use a { word *addr; int offset} combination for char
*'s.
There are also machines (Primes spring to mind) which have pointers which
are the same for all *data*, but in which, say, function pointers will be of
a different size.

Lastly (the reason for my posting), I go back to Cybers.  60-bit words,
60-bit data registers, 18-bits of address.  A <whatever> * on that machine
is 18-bits, while, for convenience sake, all data types are said to be
60-bits.  This breaks code that even most careful programmers write (when
you print out a pointer, for example, do you typecast it do long and use a
%ld format?)...

-- 
Sean Eric Fagan  | "What the caterpillar calls the end of the world,
seanf at sco.UUCP   |  the master calls a butterfly."  -- Richard Bach
(408) 458-1422   | Any opinions expressed are my own, not my employers'.



More information about the Comp.lang.c mailing list