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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ab4f67f984ef04f9 X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!news.glorb.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!nntp.giganews.com.MISMATCH!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Fri, 21 May 2004 14:58:42 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <878yfmiuak.fsf@insalien.org> <5ad0dd8a.0405210313.70f9339d@posting.google.com> Subject: Re: Is the Ada run-time required to detect out-of-memory conditions? Date: Fri, 21 May 2004 14:58:46 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-mTViR0pihSfFB7Dogt8xwCoxGueoxuxpWyEc/t4uJ3161ngLw2T0tcDff7ZRGKWDA4s/jZQ5V9Ufm8q!Hc/k/ECmVccpiQRBBD7eaGvAo0FiW5k6wqINIHQZjFCZrcMc3mYbKgtUaf/hlkfqSgyx9C7h5zE2 X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: controlnews3.google.com comp.lang.ada:754 Date: 2004-05-21T14:58:46-05:00 List-Id: "Wojtek Narczynski" wrote in message news:5ad0dd8a.0405210313.70f9339d@posting.google.com... ... > > The program allocates memory in an infinite loop using "new" and the > > default storage pool, and of course exhausts all available storage. > > The issue is whether or not Storage_Error should be raised. With > > GNAT, no exception is raised; instead the program receives SIGKILL > > (not even SIGSEGV) from Linux. > > I noticed, that if the program allocates memory in 6Kb chunks or > larger, Storate_Error is raised. If the chunk size is 5Kb or less, the > program only prints "Killed". In between I have not tested. > > Also, shouldn't cases like this one, as a rule, eventually become part > of ACATS? There is such an ACATS test. The original version just tried to allocate memory until it was exhausted. In our case, this caused virtual memory target machines to thrash badly (there was about one allocated item per page). We ended up limiting the amount of heap memory to 8 Meg in order to make that test pass -- which really was in no one's interest. We discussed the issues and concluded that tests that try to exhaust memory are meaningless on virtual memory systems. That version was replaced by a newer one that (A) allocates larger chunks of memory; and (B) only tries to allocate a limited amount of memory before giving up. That preserves the test for the embedded systems that it is meaningful for, and prevents the need to do senseless things like limit the amount of memory that you can allocate. Randy.