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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.99.167.4 with SMTP id d4mr297821pgf.27.1490893971239; Thu, 30 Mar 2017 10:12:51 -0700 (PDT) X-Received: by 10.157.59.229 with SMTP id k92mr79270otc.9.1490893971179; Thu, 30 Mar 2017 10:12:51 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!y18no2162333itc.0!news-out.google.com!j72ni1414itb.0!nntp.google.com!y18no2162328itc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 30 Mar 2017 10:12:50 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:191:8303:2100:9489:92e6:2958:d13; posting-account=fdRd8woAAADTIlxCu9FgvDrUK4wPzvy3 NNTP-Posting-Host: 2601:191:8303:2100:9489:92e6:2958:d13 References: <39ada48a-1faf-49fd-a97d-8544269de8e7@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <7fee6e3d-bc45-477f-a9fd-0795acb31282@googlegroups.com> Subject: Re: Interfaces.C + generics: stack overflow From: Robert Eachus Injection-Date: Thu, 30 Mar 2017 17:12:51 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:46509 Date: 2017-03-30T10:12:50-07:00 List-Id: On Monday, March 27, 2017 at 3:21:19 AM UTC-4, Dmitry A. Kazakov wrote: > > I never got Storage_Error otherwise than in infinite recursion calls.=20 > The most frequent case lies outside Ada when interfacing C. Dave and I worked at MITRE, mostly on software embedded in radar systems. = Since these systems were hard real time (a late answer is worse than wrong)= virtual memory was used only on software development systems. Debugging o= n real hardware usually cramped the actual software by using up any "spare"= memory to load the debugger. So not only did Storage_Error indicate a pro= blem somewhere, but the site where Storage_Error was raised often had nothi= ng to do with the "real" error where some component of the system used more= than its allocated amount of memory. On virtual memory systems, Storage_Error should occur only in two cases. O= ne where the limited assets allocate for some purpose are exhausted. (Over= flowing a task stack is the most usual, and pushing up the stack size the o= bvious fix.) The other is where you exhaust the virtual address space. Tho= se usually occur where array dimensions were not constrained. (Notice that= today, on 64-bit systems allocating a (2**31 byte) string when allocating = the max for unbounded objects may sail right along. ;-)