From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Dynamic allocation in the predefined language environment Date: Mon, 6 Jul 2015 15:22:13 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <559a623d$0$293$14726298@news.sunsite.dk> <873811cre5.fsf@theworld.com> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1436214134 18483 24.196.82.226 (6 Jul 2015 20:22:14 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 6 Jul 2015 20:22:14 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:26659 Date: 2015-07-06T15:22:13-05:00 List-Id: "Bob Duff" wrote in message news:873811cre5.fsf@theworld.com... > Matthias-Christian Ott writes: ... >>...I suppose most implementations will >> raise a Storage_Error exception but the standard does not specify how >> the packages are to implemented so a program could simply crash and >> would still conform to the standard. > > No, running out of memory raises Storage_Error. The implementation > cannot "simply crash". > > It's true that the standard does not specify how the packages are > implemented, but they still have to be implemented correctly. > There's nothing in the RM that says they can crash, so they > can't. Right. Formally, only program executions that are erroneous can crash. So unless the Standard declares doing something erroneous, crashing is not an option. (Modulo compiler or runtime bugs, of course.) Running out of memory has to raise some exception, and since the only exception defined for that case is Storage_Error, and there isn't any other exception defined for most of the operations in question, there really isn't any other choice for a correct implementation of a library. No matter what it does under the covers. Randy.