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.2 required=5.0 tests=BAYES_00,FROM_LOCAL_HEX, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c9d5fc258548b22a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Vinzent Hoefler" <0439279208b62c95f1880bf0f8776eeb@t-domaingrabbing.de> Newsgroups: comp.lang.ada Subject: Re: How do I write directly to a memory address? Date: Thu, 10 Feb 2011 18:33:08 +0100 Message-ID: References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <4d51905c$0$19486$882e7ee2@usenet-news.net> <36212a7b-deab-45d9-ac45-aa29cd90c7bc@o18g2000prh.googlegroups.com> <4d51a7bb$0$19486$882e7ee2@usenet-news.net> <4d52b489$0$19486$882e7ee2@usenet-news.net> <9a8njlwvey1p.1a96yvvgdf6yu.dlg@40tude.net> <4d52c5e5$0$19486$882e7ee2@usenet-news.net> <720b7e8f-1ae2-4b3b-851e-12b08b3c99e0@r4g2000prm.googlegroups.com> <4d52dd97$0$18057$882e7ee2@usenet-news.net> <9a8f406d-05ca-4bf3-8487-918d4e0dd634@o18g2000prh.googlegroups.com> <4d52ee47$0$18057$882e7ee2@usenet-news.net> <4d5306a0$0$18057$882e7ee2@usenet-news.net> <76c123ab-7425-44d8-b26d-b2b41a9aa42b@o7g2000prn.googlegroups.com> <4d5310ab$0$18057$882e7ee2@usenet-news.net> <9bff52ca-6213-41da-8fa4-3a4cdd8086d3@y36g2000pra.googlegroups.com> <4d5315c8$0$18057$882e7ee2@usenet-news.net> <4d531a54$0$18057$882e7ee2@usenet-news.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: individual.net r4Gb7tICWeSijZlgKGNmtgHo3FhYevR1OxoaJ8NdL9P6pzdjt9 Cancel-Lock: sha1:12ir4TK9/hIAiiOfj4Xtw5gC9xw= User-Agent: Opera Mail/11.01 (Win32) Xref: g2news2.google.com comp.lang.ada:18195 Date: 2011-02-10T18:33:08+01:00 List-Id: Hyman Rosen wrote: > Hmm. You know, this makes me think that before I can call > any subprogram, I'm going to need to examine its body to > see how many nested subprogram calls it makes, as well as > those bodies, and so on. And even then, is there anything > that tells me exactly when I will get Storage_Error? Not in your case, because you implemented it recursively. > How can I reason about the behavior of any Ada program? The same way tools like PC-Lint reasons about the minimum needed stack size of a given C-program. > of Ada code? Doesn't every subprogram call potentially > raise Storage_Error, and isn't that possibility usually > ignored? Yes. No. In critical applications recursive calls are not allowed and if there aren't any, a minimum stack size can be statically determined before the program is even run. Same thing in C. The difference is that with an Ada program and enabled stack check you get Storage_Error while a C-program just behaves in a funny way. Vinzent. -- You know, we're sitting on four million pounds of fuel, one nuclear weapon, and a thing that has 270,000 moving parts built by the lowest bidder. Makes you feel good, doesn't it? -- Rockhound, "Armageddon"