From: kaz@vision.crest.nt.com (Kaz Kylheku)
Subject: Re: Flexible Strings (was Equality operator...)
Date: 1997/05/06
Date: 1997-05-06T00:00:00+00:00 [thread overview]
Message-ID: <5kocg6$hln@bcrkh13.bnr.ca> (raw)
In-Reply-To: dewar.862755569@merv
In article <dewar.862755569@merv>, Robert Dewar <dewar@merv.cs.nyu.edu> wrote:
>So no language standard can meaninfuly specify formal semantiocs for
>what deallocation might mean, beyond specifying that reference to freed
>storage is in an appropriate sense incorrect.
>
>So Ada is no different from C or Pascal or any other lanuage here. I suspect
>that Kevin is not the kind of person who spends his time studying formal
>standards, but if you want to follow this up, for example go look at the
>definition of Dispose in the ANSI Pascal standard.
Actually Ada must be different here. If were were discussing C, we wouldn't
need to generate a week long thread regarding what malloc() and free() are, and
how to use them.
>What does the Ada standard say about Unchecked_Deallocation:
>
> 9 Free(X), when X is not equal to null first performs finalization,
> as described in 7.6. It then deallocates the storage occupied by
> the object designated by X. If the storage pool is a user-defined
>
>
>Nice, but of course deallocate is not really formally defined, then we have
>the implementation advice:
>
>17 For a standard storage pool, Free should actually reclaim the storage.
>
>again "actually reclaim" is not formally defined.
>
>BUT, does this matter in practice? Of course not, all Ada compilers always
>have followed this advice for the standard storage pool, and it would be
>surprising if it were otherwise. This is exactly the same situation as
>observing that all C compilers actualy free storage when free is used.
But the C standard firmly says that ``The free function causes the space
pointed to by ptr to be deallocated, that is, made available for further
allocation'' (ISO 9899:1990 7.10.3.2 The free function). This pretty much
constitutes a requirement that the C implementation actually deallocate
when free is called, which carries more weight than a mere observation
about what all existing implementations do.
next prev parent reply other threads:[~1997-05-06 0:00 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-04-30 0:00 Flexible Strings (was Equality operator...) W. Wesley Groleau (Wes)
1997-04-30 0:00 ` Matthew Heaney
1997-05-01 0:00 ` Robert Dewar
1997-05-02 0:00 ` Kevin Cline
1997-05-03 0:00 ` Jon S Anthony
1997-05-03 0:00 ` Robert Dewar
1997-05-04 0:00 ` Kevin Cline
1997-05-04 0:00 ` Robert Dewar
1997-05-06 0:00 ` Kaz Kylheku [this message]
1997-05-07 0:00 ` Robert A Duff
1997-05-07 0:00 ` Robert Dewar
1997-05-08 0:00 ` Robert I. Eachus
1997-05-07 0:00 ` Robert Dewar
1997-05-07 0:00 ` Kevin Cline
1997-05-07 0:00 ` Robert A Duff
1997-05-07 0:00 ` Matthew Heaney
1997-05-07 0:00 ` Jon S Anthony
1997-05-07 0:00 ` Jon S Anthony
1997-05-07 0:00 ` Robert Dewar
1997-05-07 0:00 ` Robert Dewar
1997-05-09 0:00 ` Erik Magnuson
1997-05-10 0:00 ` John G. Volan
1997-05-10 0:00 ` Robert Dewar
1997-05-10 0:00 ` Matthew Heaney
1997-05-11 0:00 ` Robert Dewar
1997-05-12 0:00 ` Erik Magnuson
1997-05-10 0:00 ` Robert Dewar
1997-05-10 0:00 ` Matthew Heaney
[not found] <199705010554.WAA24507@ni1.ni.net>
1997-05-01 0:00 ` W. Wesley Groleau (Wes)
1997-05-02 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox