comp.lang.ada
 help / color / mirror / Atom feed
From: "G.B." <bauhaus@futureapps.invalid>
Subject: Re: Dynamic allocation in the predefined language environment
Date: Mon, 6 Jul 2015 15:04:35 +0200
Date: 2015-07-06T15:04:35+02:00	[thread overview]
Message-ID: <mnduaf$10f$1@dont-email.me> (raw)
In-Reply-To: <559a623d$0$293$14726298@news.sunsite.dk>

On 06.07.15 13:13, Matthias-Christian Ott wrote:

> Unbounded-length strings do not have this limitation but requires
> dynamic memory allocation (or at least I see no other way to implement
> it) which in turn requires error handling of memory allocation errors.
> However, if I'm not mistaken neither Ada 95, nor Ada 2005, nor Ada 2012
> specify how memory allocation errors are to be reported or handled and
> do not allow one to specify the storage pool from which unbounded-length
> strings are allocated.

I think that LRM 13.11 might apply here (coming from LRM 4.8),

"If Storage_Pool is not specified for a type defined by an
  access_to_object_definition, then the implementation chooses
  a standard storage pool for it in an implementation-defined
  manner.  In this case, the exception Storage_Error is raised
  by an allocator if there is not enough storage."

A handler then, if possible, could be of the kind that
does not require additional resources for its execution.
It might be more tricky to use one with tasks, but IIUC,
one can attach termination handlers.



  reply	other threads:[~2015-07-06 13:04 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. [this message]
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
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