Re: memory management
- From: Robert A Duff <bobduff@xxxxxxxxxxxxxxxxxxxx>
- Date: 31 May 2005 08:04:47 -0400
Simon Wright <simon@xxxxxxxxxxxx> writes:
> Robert A Duff <bobduff@xxxxxxxxxxxxxxxxxxxx> writes:
>
> > By the way, I believe the fat pointers used by GNAT are an option --
> > there's some way to tell it to use thin pointers for
> > access-to-array. GNAT uses fat pointers (by default) only when the
> > designated type is an array, or when the designated type is unknown
> > to the compiler. Access-to-record, which is far more common, uses
> > thin pointers. I don't know of any Ada implementation besides GNAT
> > that uses fat pointers at all.
>
> I think that it uses fat pointers when the type concerned is
> indefinite.
I don't think so -- I think it's only for indefinite *arrays*
(or unknown types). There's really no advantage in fat pointers
for records, unless tags/discrims are separated out, which GNAT
does not do. (Nor does any other compiler I know of.)
> You can make it use thin pointers by specifying the 'Size of the
> pointer (to be 32) or, I'm pretty sure, by pragma Convention (C); I've
> sent classwide pointers via Xt client_data values using one of these
> techniques.
Yes, I think that's right.
- Bob
.
- References:
- memory management
- From: alex goldman
- Re: memory management
- From: Robert A Duff
- Re: memory management
- From: Martin Krischik
- Re: memory management
- From: Robert A Duff
- Re: memory management
- From: Simon Wright
- memory management
- Prev by Date: Re: Adding functions to generic package
- Previous by thread: Re: memory management
- Next by thread: Direct_IO and files of tagged types
- Index(es):
Relevant Pages
|