comp.lang.ada
 help / color / mirror / Atom feed
From: stt@spock.camb.inmet.com (Tucker Taft)
Subject: Re: Access type representations.
Date: Fri, 28 Oct 1994 13:36:25 GMT
Date: 1994-10-28T13:36:25+00:00	[thread overview]
Message-ID: <CyDxsq.JFB@inmet.camb.inmet.com> (raw)
In-Reply-To: 9410281131.AA15384@eurocontrol.de

In article <9410281131.AA15384@eurocontrol.de>,
Bob Wells #402  <wel@EUROCONTROL.DE> wrote:

>G'day,
>Getting back to that thread of using access types to interface with
>pointers in C, David emery said that my assumption that the access
>type in Ada does not necessarily have to contain the address.
>
>My question is are there compilers out there that do *not* use the
>address within the access type for the representation of the allocated
>object? If there are, what do they use?

There are three basic alternatives to addresses:

   1) the "offset" part of a segmented address;

      This makes sense on the old X86 architecture,
      where the full address requires two registers,
      but one could decide to put all heap data into
      a single segment.

   2) offsets relative to the beginning of the heap;

      This is similar to (1), but doesn't depend
      on the hardware having a segmented architecture.

   3) indices into a heap of same-sized objects.

      This is similar to (2), except that it reduces
      the number of bits needed for an access value even
      further by dividing the offset by the number of
      bytes per object.

(1) and (2) work when the heap is contiguous and of
some limited size, e.g. when the 'Storage_Size attribute
is specified for the access type.

I don't know how many compilers use the above alternatives.
I know some RR compilers used to use (1), and some Rational
compilers used to use (2) or (3).

>Thanks,
>Bob W. (-:

-Tucker Taft  stt@inmet.com
Intermetrics, Inc.



  reply	other threads:[~1994-10-28 13:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-10-28 11:31 Access type representations Bob Wells #402
1994-10-28 13:36 ` Tucker Taft [this message]
1994-10-28 16:52   ` Robert Dewar
1994-10-28 17:03 ` Mitch Gart
1994-10-30 16:02   ` Robert Dewar
1994-11-01 13:57   ` Keith Thompson
  -- strict thread matches above, loose matches on Subject: below --
1994-11-02  7:53 Bob Wells #402
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox