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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Is the Ada run-time required to detect out-of-memory conditions? Date: Fri, 21 May 2004 14:55:40 +0200 Organization: AdaCL Message-ID: <1486434.Nr7pvG7a0e@linux1.krischik.com> References: <878yfmiuak.fsf@insalien.org> <5ad0dd8a.0405210313.70f9339d@posting.google.com> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1085147829 07 568 P9L5GyNO1aro+d5 040521 13:57:09 X-Complaints-To: usenet-abuse@t-online.de X-ID: VTJIAEZBYe2Gz6lJmknNIbc++mUdZ2Ttdt9rSVZpr82Sv5FeC7EwUW User-Agent: KNode/0.7.7 Xref: controlnews3.google.com comp.lang.ada:745 Date: 2004-05-21T14:55:40+02:00 List-Id: Wojtek Narczynski wrote: > Hello, > >> I have received a bug report [1] against GNAT 3.15p and reproduced the >> same behaviour with GCC 3.4. I would like the advice of language >> lawyers on the issue. >> >> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=250076 >> >> 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? Just a thought: The page size on Intel CPU's is 4 kb. So most OS's on Intel CPU will only handle memory requests of at least one page. I find it interesting that with request significantly larger then one page everything seems Ok. Lets Think: With GNAT allocation from the standart storrage pool are just passed down to C's malloc (). When smaller memory is requested most C compiler will bundele several requests into one page request. When larger memory is requested some C compiler will just pass the request on to the OS and some other will allways bundle. With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com