comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Dynamic allocation in the predefined language environment
Date: Wed, 8 Jul 2015 23:16:47 +0200
Date: 2015-07-08T23:16:47+02:00	[thread overview]
Message-ID: <1bv14e65z4ys0$.1qgyoeym2s0hg.dlg@40tude.net> (raw)
In-Reply-To: mnjuoa$in8$1@loke.gir.dk

On Wed, 8 Jul 2015 14:47:22 -0500, Randy Brukardt wrote:

> It's hard to imagine how any programming language (or language 
> implementation) could protect against running out of memory.

By using contracts? E.g. the post-condition:

      stack has more than n free storage units elements
   AND
      whatever normal completion does.
OR
      stack has less than n free storage units elements
   AND
      Storage_Error raised

With such contracts you could prove that Storage_Error is not raised if the
client has more than m free storage units of the stack.

> At best, one can try to contain the damage,

It is usually too late at this point and useless for any practical purpose
anyway.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  parent reply	other threads:[~2015-07-08 21:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 11:13 Dynamic allocation in the predefined language environment Matthias-Christian Ott
2015-07-06 13:04 ` G.B.
2015-07-06 14:21   ` Matthias-Christian Ott
2015-07-06 14:06 ` Bob Duff
2015-07-06 14:16   ` Matthias-Christian Ott
2015-07-06 14:23     ` G.B.
2015-07-06 14:43       ` Matthias-Christian Ott
2015-07-06 14:56         ` Bob Duff
2015-07-07  8:46           ` Matthias-Christian Ott
2015-07-07 22:32             ` Bob Duff
2015-07-08 19:47               ` Randy Brukardt
2015-07-08 21:08                 ` Bob Duff
2015-07-10 21:58                   ` Randy Brukardt
2015-07-08 21:16                 ` Dmitry A. Kazakov [this message]
2015-07-06 14:45     ` Bob Duff
2015-07-06 20:28       ` Randy Brukardt
2015-07-07  8:49       ` Matthias-Christian Ott
2015-07-07 22:14         ` Bob Duff
2015-07-06 15:29   ` Simon Wright
2015-07-06 20:31     ` Randy Brukardt
2015-07-06 21:35       ` Simon Wright
2015-07-07 18:29         ` Randy Brukardt
2015-07-06 20:22   ` Randy Brukardt
2015-07-06 18:45 ` Jeffrey R. Carter
2015-07-07  7:42 ` Dmitry A. Kazakov
2015-07-07  8:23   ` Matthias-Christian Ott
2015-07-07  8:46     ` Dmitry A. Kazakov
replies disabled

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