comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Free'ing extended types
Date: 1996/04/29
Date: 1996-04-29T00:00:00+00:00	[thread overview]
Message-ID: <Dqn8u5.E3x@world.std.com> (raw)
In-Reply-To: 4xpw8qvlau.fsf@lagrange.enst-bretagne.fr


In article <4xpw8qvlau.fsf@lagrange.enst-bretagne.fr>,
Laurent Guerby <Laurent.Guerby@enst-bretagne.fr> wrote:
>   Note that the impact of a  GC on the  "erronenousness" of a program
>is    interesting.  An   Ada run-time  with   GC    can  simply ignore
>Unchecked_Dealocation calls, or do smart thing and raise Program_Error
>when an access to a previously deallocated object is performed. In the
>first case (do  nothing on deallocation)  I think the execution is not
>erroneous because RM95-13.11.2(16) says :
>
>"Evaluating  a  name that denotes a  nonexistent  object is erroneous.
>The execution  of a call to  an  instance of Unchecked_Deallocation is
>erroneous if the object was created other than by  an allocator for an
>access type whose pool is Name'Storage_Pool."
>
>   On  a garbage collected implementation,  the object is likely to be
>"existant" or your GC is wrong ;-).

No, I don't think so.  The RM says an Unchecked_Deallocated object is
non-existent, and deallocating it is erroneous.  If you have a GC that
thinks it still exists, that's fine, but it's irrelevant to the formal
definition of erroneous.  (In this case I'd like the gc to raise an
exception, but of course that's not required, since erroneous means
*anything* can happen, including keeping the officially deallocated
object around and using it as usual.)

- Bob




  reply	other threads:[~1996-04-29  0:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-28  0:00 Free'ing extended types Jonas Nygren
1996-04-28  0:00 ` Robert Dewar
1996-04-29  0:00   ` Laurent Guerby
1996-04-29  0:00     ` Robert A Duff [this message]
1996-04-29  0:00       ` Robert Dewar
1996-04-29  0:00   ` Jonas Nygren
1996-04-29  0:00     ` Robert A Duff
1996-04-29  0:00       ` Robert Dewar
1996-04-29  0:00         ` Robert A Duff
1996-04-29  0:00       ` Jonas Nygren
1996-05-20  0:00       ` Type conversion between access types (was: Free'ing extended types) Scott Leschke
1996-05-21  0:00         ` Robert A Duff
1996-05-22  0:00           ` Scott Leschke
1996-05-23  0:00             ` Robert A Duff
1996-05-23  0:00               ` progers
1996-05-24  0:00               ` Scott Leschke
1996-05-24  0:00                 ` Robert A Duff
1996-05-21  0:00         ` Dale Stanbrough
1996-05-21  0:00           ` Robert A Duff
1996-04-29  0:00   ` Free'ing extended types Laurent Guerby
1996-04-29  0:00     ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
1996-04-26  0:00 Jonas Nygren
1996-04-26  0:00 ` Laurent Guerby
1996-04-27  0:00   ` Jerry van Dijk
1996-04-28  0:00     ` Robert Dewar
1996-04-28  0:00   ` Jonas Nygren
replies disabled

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