In Ada 83, pointers (access variables) can point only to objects in the heap. Ada 95 allows

Question:

In Ada 83, pointers (access variables) can point only to objects in the heap. Ada 95 allows a new kind of pointer, the access all type, to point to other objects as well, provided that those objects have been declared to be aliased:

type int_ptr is access all Integer;

foo : aliased Integer;

ip : int_ptr;

...

ip := foo'Access;

The ‚Access attribute is roughly equivalent to C’s “address of” (&) operator. How would you implement access all types and aliased objects? How would your implementation interact with automatic garbage collection (assuming it exists) for objects in the heap?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: